Skip to content

Commit

Permalink
Apply pull request grisumbras#32 to fix MSVC 2022 compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Crews committed Sep 5, 2022
1 parent e9a1fa3 commit 4ecb982
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/flags/flags.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@ template <class E> class flags {
template <class ... Args>
flags(enum_type e, Args ... args) noexcept : flags{e, args...} {}


template <class FwIter>
flags(FwIter b, FwIter e,
typename convertible<decltype(*std::declval<FwIter>())>::type = nullptr)
noexcept(noexcept(std::declval<flags>().insert(std::declval<FwIter>(),
std::declval<FwIter>())))
: val_(0)
{ insert(b, e); }

constexpr explicit operator bool() const noexcept { return val_ != 0; }

Expand Down

0 comments on commit 4ecb982

Please sign in to comment.