Skip to content

Commit 4ecb982

Browse files
author
Tim Crews
committed
Apply pull request grisumbras#32 to fix MSVC 2022 compilation error
1 parent e9a1fa3 commit 4ecb982

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

include/flags/flags.hpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,13 @@ template <class E> class flags {
8383
template <class ... Args>
8484
flags(enum_type e, Args ... args) noexcept : flags{e, args...} {}
8585

86-
86+
template <class FwIter>
87+
flags(FwIter b, FwIter e,
88+
typename convertible<decltype(*std::declval<FwIter>())>::type = nullptr)
89+
noexcept(noexcept(std::declval<flags>().insert(std::declval<FwIter>(),
90+
std::declval<FwIter>())))
91+
: val_(0)
92+
{ insert(b, e); }
8793

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

0 commit comments

Comments
 (0)