From 050a63152ba606b82b32476690bbe474dd50f148 Mon Sep 17 00:00:00 2001 From: Joshua Scott Date: Fri, 16 Nov 2018 15:32:17 +0000 Subject: [PATCH] util: Attempt to fix error with FlagsEnum --- include/ki/serialization/SerializerBinary.h | 6 +++--- include/ki/util/FlagsEnum.h | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/ki/serialization/SerializerBinary.h b/include/ki/serialization/SerializerBinary.h index 0f8a5a5..0532100 100644 --- a/include/ki/serialization/SerializerBinary.h +++ b/include/ki/serialization/SerializerBinary.h @@ -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); } + +// Make sure the flags enum can be used like a bitflag +MAKE_FLAGS_ENUM(ki::serialization::SerializerBinary::flags); diff --git a/include/ki/util/FlagsEnum.h b/include/ki/util/FlagsEnum.h index c178526..5b5907b 100644 --- a/include/ki/util/FlagsEnum.h +++ b/include/ki/util/FlagsEnum.h @@ -2,8 +2,9 @@ #include #define MAKE_FLAGS_ENUM(n) \ - template <> \ - struct ki::is_flags_enum : std::true_type {} + namespace ki { \ + template <> \ + struct is_flags_enum : std::true_type {}; } #define SET_FLAG(v, f) v |= f #define UNSET_FLAG(v, f) v &= ~f @@ -65,4 +66,4 @@ namespace ki { return lhs = lhs & rhs; } -} \ No newline at end of file +}