// // Created by erki on 15.07.22. // #ifndef SKULLC_UTILITY_ENUM_HELPERS_HPP_ #define SKULLC_UTILITY_ENUM_HELPERS_HPP_ #define SKULLC_ENUM_DECLARE_BITFLAG_OPERATORS(E) \ inline E operator|(const E& lhs, const E& rhs) \ { \ using T = std::underlying_type_t; \ return static_cast(static_cast(lhs) | static_cast(rhs)); \ } \ inline E operator&(const E& lhs, const E& rhs) \ { \ using T = std::underlying_type_t; \ return static_cast(static_cast(lhs) & static_cast(rhs)); \ } #endif//SKULLC_UTILITY_ENUM_HELPERS_HPP_