From 8e865212848752668d67af91f227737abe9044a3 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 29 Dec 2018 13:29:46 +0100 Subject: compat/enum-operators: don't use reserved symbol name --- compat/enum-operators.hpp | 11 ++++++----- 1 file 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; \ - return static_cast(t__((a)) op t__((b))); \ + using t_ = std::underlying_type_t; \ + 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 \ + 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; \ + using t_ = std::underlying_type_t; \ return type(op t_((x))); \ } // end -- cgit v1.2.3