Global: Make operator|= and &= for enums constexpr

These are allowed to be constexpr since C++14
This commit is contained in:
Lioncash 2019-09-07 12:36:56 -04:00
parent 30158859f7
commit b629d90147
1 changed files with 2 additions and 2 deletions

View File

@ -95,12 +95,12 @@ typedef struct stat64 atStat64_t;
using T = std::underlying_type_t<type>; \
return type(static_cast<T>(a) & static_cast<T>(b)); \
} \
inline type& operator|=(type& a, const type& b) { \
constexpr type& operator|=(type& a, type b) { \
using T = std::underlying_type_t<type>; \
a = type(static_cast<T>(a) | static_cast<T>(b)); \
return a; \
} \
inline type& operator&=(type& a, const type& b) { \
constexpr type& operator&=(type& a, type b) { \
using T = std::underlying_type_t<type>; \
a = type(static_cast<T>(a) & static_cast<T>(b)); \
return a; \