#pragma once #include namespace sead { /// For storing an enum with a particular storage size when specifying the underlying type of the /// enum is not an option. template struct SizedEnum { static_assert(std::is_enum()); static_assert(!std::is_enum()); constexpr SizedEnum() = default; constexpr SizedEnum(Enum value) { *this = value; } constexpr operator Enum() const { return static_cast(mValue); } constexpr SizedEnum& operator=(Enum value) { mValue = static_cast(value); return *this; } Storage mValue; }; } // namespace sead