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 {
86
86
m_value ^= ((1U << static_cast <UnderlyingBit>(args)) | ...);
87
87
}
88
88
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
+ }
91
95
constexpr auto operator |=(FlagsOf const & other) -> FlagsOf& { return m_value |= other.m_value , *this ; }
92
96
constexpr auto operator &=(FlagsOf const & other) -> FlagsOf& { return m_value &= other.m_value , *this ; }
93
97
You can’t perform that action at this time.
0 commit comments