mirror of
https://github.com/nlohmann/json.git
synced 2026-11-22 02:44:22 +00:00
Test for EMPTY and MEMBERS so -Wunused-macros accepts them
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
1 file changed
+4
@@ -958,6 +958,10 @@ class dispatch_with_user_macros_derived_members : public dispatch_with_user_macr
|
|||||||
// NOLINTNEXTLINE(misc-use-internal-linkage)
|
// NOLINTNEXTLINE(misc-use-internal-linkage)
|
||||||
NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE(dispatch_with_user_macros_derived_members, dispatch_with_user_macros_members, own)
|
NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE(dispatch_with_user_macros_derived_members, dispatch_with_user_macros_members, own)
|
||||||
|
|
||||||
|
// testing for the macros also keeps -Wunused-macros from rejecting them
|
||||||
|
#if !defined(EMPTY) || !defined(MEMBERS)
|
||||||
|
#error "EMPTY and MEMBERS must stay defined for the tests above"
|
||||||
|
#endif
|
||||||
#undef EMPTY
|
#undef EMPTY
|
||||||
#undef MEMBERS
|
#undef MEMBERS
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user