#pragma once #include //namespace SHADE //{ // template // class SHEnumWrapper // { // public: // using UnderlyingType = typename std::underlying_type_t; // // private: // UnderlyingType mask; // // public: // // constexpr SHEnumWrapper(void) noexcept // : mask{ 0 } // { // // }; // // constexpr SHEnumWrapper(BitType bit) noexcept // : mask{ static_cast(bit) } // { // // }; // // constexpr SHEnumWrapper(SHEnumWrapper const& rhs) noexcept = default; // constexpr SHEnumWrapper& operator= (SHEnumWrapper const& rhs) noexcept = default; // // constexpr explicit SHEnumWrapper(UnderlyingType flags) noexcept // : mask{ flags } // { // // }; // // constexpr SHEnumWrapper operator| (SHEnumWrapper const& rhs) const noexcept // { // return static_cast> (mask | rhs.mask); // }; // // constexpr SHEnumWrapper operator& (SHEnumWrapper const& rhs) const noexcept // { // return static_cast> (mask & rhs.mask); // }; // // constexpr operator UnderlyingType() const noexcept // { // return mask; // }; // }; // // template>> // inline BitType operator|(const BitType& left, const BitType& right) // { // return static_cast(static_cast(left) | static_cast(right)); // } // // template>> // inline BitType operator&(const BitType& left, const BitType& right) // { // return static_cast(static_cast(left) & static_cast(right)); // } // //}