File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -86,8 +86,12 @@ template<HasMetaEnum Enum> struct FlagsOf {
8686 m_value ^= ((1U << static_cast <UnderlyingBit>(args)) | ...);
8787 }
8888
89- constexpr auto operator |(FlagsOf const & other) const -> FlagsOf { return FlagsOf{m_value | other.m_value }; }
90- constexpr auto operator &(FlagsOf const & other) const -> FlagsOf { return FlagsOf{m_value & other.m_value }; }
89+ constexpr auto operator |(FlagsOf const & other) const -> FlagsOf {
90+ return FlagsOf{static_cast <Value>(m_value | other.m_value )};
91+ }
92+ constexpr auto operator &(FlagsOf const & other) const -> FlagsOf {
93+ return FlagsOf{static_cast <Value>(m_value & other.m_value )};
94+ }
9195 constexpr auto operator |=(FlagsOf const & other) -> FlagsOf& { return m_value |= other.m_value , *this ; }
9296 constexpr auto operator &=(FlagsOf const & other) -> FlagsOf& { return m_value &= other.m_value , *this ; }
9397
You can’t perform that action at this time.
0 commit comments