mirror of
https://github.com/nlohmann/json.git
synced 2026-09-24 17:00:31 +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:
@@ -958,6 +958,10 @@ class dispatch_with_user_macros_derived_members : public dispatch_with_user_macr
|
||||
// NOLINTNEXTLINE(misc-use-internal-linkage)
|
||||
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 MEMBERS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user