mirror of https://github.com/libAthena/athena.git
Correct use of constexpr
This commit is contained in:
parent
cf3dfcddff
commit
750d23c686
|
@ -87,19 +87,19 @@ constexpr type operator&(type a, type b)\
|
||||||
using T = std::underlying_type_t<type>;\
|
using T = std::underlying_type_t<type>;\
|
||||||
return type(static_cast<T>(a) & static_cast<T>(b));\
|
return type(static_cast<T>(a) & static_cast<T>(b));\
|
||||||
}\
|
}\
|
||||||
constexpr type& operator|=(type& a, const type& b)\
|
inline type& operator|=(type& a, const type& b)\
|
||||||
{\
|
{\
|
||||||
using T = std::underlying_type_t<type>;\
|
using T = std::underlying_type_t<type>;\
|
||||||
a = type(static_cast<T>(a) | static_cast<T>(b));\
|
a = type(static_cast<T>(a) | static_cast<T>(b));\
|
||||||
return a;\
|
return a;\
|
||||||
}\
|
}\
|
||||||
constexpr type& operator&=(type& a, const type& b)\
|
inline type& operator&=(type& a, const type& b)\
|
||||||
{\
|
{\
|
||||||
using T = std::underlying_type_t<type>;\
|
using T = std::underlying_type_t<type>;\
|
||||||
a = type(static_cast<T>(a) & static_cast<T>(b));\
|
a = type(static_cast<T>(a) & static_cast<T>(b));\
|
||||||
return a;\
|
return a;\
|
||||||
}\
|
}\
|
||||||
constexpr type operator~(const type& key)\
|
inline type operator~(const type& key)\
|
||||||
{\
|
{\
|
||||||
using T = std::underlying_type_t<type>;\
|
using T = std::underlying_type_t<type>;\
|
||||||
return type(~static_cast<T>(key));\
|
return type(~static_cast<T>(key));\
|
||||||
|
|
Loading…
Reference in New Issue