Skip to content

Commit

Permalink
Note need for interior JSON member override
Browse files Browse the repository at this point in the history
  • Loading branch information
oblivioncth committed Jul 27, 2023
1 parent 620ca72 commit f9cb258
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/core/include/qx/core/qx-json.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ namespace QxJson \
#define QX_JSON_STRUCT_OUTSIDE(Struct, ...) __QX_JSON_META_STRUCT_OUTSIDE(Struct, std::make_tuple(QX_FOR_EACH_DELIM(QX_JSON_MEMBER, __VA_ARGS__)))
#define QX_JSON_STRUCT_OUTSIDE_X(Struct, ...) __QX_JSON_META_STRUCT_OUTSIDE(Struct, std::make_tuple(__VA_ARGS__))

/*
* TODO: Create an "inside" version of this macro and its underlying functions, though it's tricky
* given clang/GCCs issues with non-namespace explicit template specializations so either a dummy
* template parameter will need to be used (to make it technically a partial specialization) or
* the specializations themselves will still need to be outside the struct (second macro), while
* the declaration of the inner override struct (first macro, e.g. QX_JSON_DECLARE_MEMBER_OVERRIDES(); )
* is inside
*/
#define QX_JSON_MEMBER_OVERRIDE(Struct, member, ...) \
namespace QxJson \
{ \
Expand Down

0 comments on commit f9cb258

Please sign in to comment.