util: Attempt to fix error with FlagsEnum

This commit is contained in:
Joshua Scott 2018-11-16 15:32:17 +00:00
parent abbaf7ce58
commit 050a63152b
2 changed files with 7 additions and 6 deletions

View File

@ -65,7 +65,7 @@ namespace serialization
const pclass::PropertyClass *m_root_object; const pclass::PropertyClass *m_root_object;
}; };
} }
// Make sure the flags enum can be used like a bitflag
MAKE_FLAGS_ENUM(ki::serialization::SerializerBinary::flags);
} }
// Make sure the flags enum can be used like a bitflag
MAKE_FLAGS_ENUM(ki::serialization::SerializerBinary::flags);

View File

@ -2,8 +2,9 @@
#include <type_traits> #include <type_traits>
#define MAKE_FLAGS_ENUM(n) \ #define MAKE_FLAGS_ENUM(n) \
template <> \ namespace ki { \
struct ki::is_flags_enum<n> : std::true_type {} template <> \
struct is_flags_enum<n> : std::true_type {}; }
#define SET_FLAG(v, f) v |= f #define SET_FLAG(v, f) v |= f
#define UNSET_FLAG(v, f) v &= ~f #define UNSET_FLAG(v, f) v &= ~f
@ -65,4 +66,4 @@ namespace ki
{ {
return lhs = lhs & rhs; return lhs = lhs & rhs;
} }
} }