Go to the documentation of this file. 3 #ifndef INDIGOX_UTILS_ENUM_CLASS_BITWISE_HPP 4 #define INDIGOX_UTILS_ENUM_CLASS_BITWISE_HPP 6 #define BITWISE_OPERATORS(enum_type) \ 7 inline enum_type operator|(enum_type l, enum_type r) { \ 8 using T = std::underlying_type_t<enum_type>; \ 9 return static_cast<enum_type>(static_cast<T>(l) | static_cast<T>(r)); \ 11 inline enum_type &operator|=(enum_type &l, enum_type r) { \ 12 using T = std::underlying_type_t<enum_type>; \ 13 l = static_cast<enum_type>(static_cast<T>(l) | static_cast<T>(r)); \ 16 inline enum_type operator&(enum_type l, enum_type r) { \ 17 using T = std::underlying_type_t<enum_type>; \ 18 return static_cast<enum_type>(static_cast<T>(l) & static_cast<T>(r)); \ 20 inline enum_type &operator&=(enum_type &l, enum_type r) { \ 21 using T = std::underlying_type_t<enum_type>; \ 22 l = static_cast<enum_type>(static_cast<T>(l) & static_cast<T>(r)); \