One more enhance

This commit is contained in:
Pokechu22 2022-08-09 16:22:33 -07:00
commit 8a03b9f46e

View file

@ -234,7 +234,7 @@ public:
constexpr Flags(std::underlying_type_t<T> hex) : m_hex(hex) {} constexpr Flags(std::underlying_type_t<T> hex) : m_hex(hex) {}
FlagBit<T> operator[](T bit) { return FlagBit(m_hex, bit); } FlagBit<T> operator[](T bit) { return FlagBit(m_hex, bit); }
bool operator[](T bit) const constexpr bool operator[](T bit) const
{ {
return (m_hex & static_cast<std::underlying_type_t<T>>(bit)) != 0; return (m_hex & static_cast<std::underlying_type_t<T>>(bit)) != 0;
} }