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;
};
}
}
// 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>
#define MAKE_FLAGS_ENUM(n) \
namespace ki { \
template <> \
struct ki::is_flags_enum<n> : std::true_type {}
struct is_flags_enum<n> : std::true_type {}; }
#define SET_FLAG(v, f) v |= f
#define UNSET_FLAG(v, f) v &= ~f