summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-12-29 13:29:46 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-01-16 07:48:19 +0100
commit8e865212848752668d67af91f227737abe9044a3 (patch)
tree2d78a5126b6f0f671a5395e95c146e4537b17d3d /compat
parent0f727e73884f888bce4b5b303cf7903617c27b64 (diff)
compat/enum-operators: don't use reserved symbol name
Diffstat (limited to 'compat')
-rw-r--r--compat/enum-operators.hpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/compat/enum-operators.hpp b/compat/enum-operators.hpp
index cefebaf0..e7300239 100644
--- a/compat/enum-operators.hpp
+++ b/compat/enum-operators.hpp
@@ -5,17 +5,18 @@
#define OTR_FLAGS_OP2(type, op) \
inline type operator op (type a, type b) \
{ \
- using t__ = std::underlying_type_t<type>; \
- return static_cast<type>(t__((a)) op t__((b))); \
+ using t_ = std::underlying_type_t<type>; \
+ return type(t_((a)) op t_((b))); \
} // end
-#define OTR_FLAGS_SHIFT(type, op) \
- type operator op (type, unsigned) = delete
+#define OTR_FLAGS_DELETE_SHIFT(type, op) \
+ template<typename u> \
+ type operator op (type, u) = delete // end
#define OTR_FLAGS_OP1(type, op) \
inline type operator op (type x) \
{ \
- using t__ = std::underlying_type_t<type>; \
+ using t_ = std::underlying_type_t<type>; \
return type(op t_((x))); \
} // end