Skip to content

Commit

Permalink
Fix type truncation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
arBmind committed Aug 23, 2024
1 parent 0ad5f46 commit 9cf7b6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/flags19.lib/flags19/FlagsOf.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ template<HasMetaEnum Enum> struct FlagsOf {
explicit constexpr FlagsOf(Value const& value) : m_value{value} {}

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

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

Expand Down

0 comments on commit 9cf7b6c

Please sign in to comment.