// #pragma once // #include // template // struct EnableBitMaskOps : std::false_type // { // }; // #define NYLA_BITENUM(name) \ // template <> \ // struct EnableBitMaskOps : std::true_type \ // { \ // }; // template // constexpr bool kEnableBitMaskOpsValue = EnableBitMaskOps::value; // template // concept BitmaskEnum = kEnableBitMaskOpsValue && std::is_enum_v; // template // constexpr auto operator|(E lhs, E rhs) // { // using U = std::underlying_type_t; // return static_cast(static_cast(lhs) | static_cast(rhs)); // } // template // constexpr auto operator|=(E& lhs, E rhs) // { // using U = std::underlying_type_t; // lhs = static_cast(static_cast(lhs) | static_cast(rhs)); // return lhs; // } // template // constexpr auto operator&(E lhs, E rhs) // { // using U = std::underlying_type_t; // return static_cast(static_cast(lhs) & static_cast(rhs)); // } // template // constexpr auto operator&=(E& lhs, E rhs) // { // using U = std::underlying_type_t; // lhs = static_cast(static_cast(lhs) & static_cast(rhs)); // return lhs; // } // template // constexpr auto operator^(E lhs, E rhs) // { // using U = std::underlying_type_t; // return static_cast(static_cast(lhs) ^ static_cast(rhs)); // } // template // constexpr auto operator^=(E& lhs, E rhs) // { // using U = std::underlying_type_t; // lhs = static_cast(static_cast(lhs) ^ static_cast(rhs)); // return lhs; // } // template // constexpr auto operator~(E val) // { // using U = std::underlying_type_t; // return static_cast(~static_cast(val)); // } // template // constexpr auto Any(E val) // { // using U = std::underlying_type_t; // return static_cast(val) != 0; // } // template // constexpr auto None() // { // return static_cast(0); // }