Skip to content

Commit 9cf7b6c

Browse files
committed
Fix type truncation warning
1 parent 0ad5f46 commit 9cf7b6c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/flags19.lib/flags19/FlagsOf.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ template<HasMetaEnum Enum> struct FlagsOf {
4040
explicit constexpr FlagsOf(Value const& value) : m_value{value} {}
4141

4242
template<class... Args> requires((sizeof...(Args) > 0) && ... && std::is_same_v<Args, Enum>)
43-
explicit constexpr FlagsOf(Args... args) : FlagsOf{((1U << static_cast<UnderlyingBit>(args)) | ...)} {}
43+
explicit constexpr FlagsOf(Args... args)
44+
: FlagsOf{static_cast<Value>(((1U << static_cast<UnderlyingBit>(args)) | ...))} {}
4445

4546
auto operator==(FlagsOf const&) const -> bool = default;
4647

0 commit comments

Comments
 (0)