summaryrefslogtreecommitdiff
path: root/src/common/utils2.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/utils2.hpp')
-rw-r--r--src/common/utils2.hpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/common/utils2.hpp b/src/common/utils2.hpp
index 7b2bc4a..3b652d5 100644
--- a/src/common/utils2.hpp
+++ b/src/common/utils2.hpp
@@ -4,6 +4,12 @@
#include <iterator>
#include <type_traits>
+#ifdef __clang__
+# define FALLTHROUGH [[clang::fallthrough]]
+#else
+# define FALLTHROUGH /* fallthrough */
+#endif
+
template<class T, class E, E max>
struct earray
{
@@ -109,19 +115,19 @@ struct remove_enum<E, true>
inline \
E operator & (E l, E r) \
{ \
- typedef typename underlying_type<E>::type U;\
+ typedef underlying_type<E>::type U; \
return E(U(l) & U(r)); \
} \
inline \
E operator | (E l, E r) \
{ \
- typedef typename underlying_type<E>::type U;\
+ typedef underlying_type<E>::type U; \
return E(U(l) | U(r)); \
} \
inline \
E operator ^ (E l, E r) \
{ \
- typedef typename underlying_type<E>::type U;\
+ typedef underlying_type<E>::type U; \
return E(U(l) ^ U(r)); \
} \
inline \