mirror of https://github.com/SeanOMik/libki.git
util: Attempt to fix error with FlagsEnum
This commit is contained in:
parent
abbaf7ce58
commit
050a63152b
|
@ -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);
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue