diff --git a/include/fixed_containers/enum_set.hpp b/include/fixed_containers/enum_set.hpp index 38be2b11..cc61e52d 100644 --- a/include/fixed_containers/enum_set.hpp +++ b/include/fixed_containers/enum_set.hpp @@ -401,6 +401,10 @@ class EnumSet } }; +template +EnumSet(InputIt first, + InputIt last) noexcept->EnumSet::value_type>; + template constexpr typename EnumSet::size_type erase_if(EnumSet& c, Predicate predicate) { diff --git a/test/enum_set_test.cpp b/test/enum_set_test.cpp index 0f6f0a0e..5e8106a2 100644 --- a/test/enum_set_test.cpp +++ b/test/enum_set_test.cpp @@ -218,6 +218,13 @@ TEST(EnumSet, IteratorConstructor) static_assert(s1.contains(TestEnum1::FOUR)); } +TEST(EnumSet, DeducedIteratorConstructor) +{ + constexpr std::array INPUT{TestEnum1::TWO, TestEnum1::FOUR}; + constexpr EnumSet s1(INPUT.begin(), INPUT.end()); + (void)s1; +} + TEST(EnumSet, InitializerConstructor) { constexpr EnumSet s1{TestEnum1::TWO, TestEnum1::FOUR};