diff --git a/src/constexpr_utils.hh b/src/constexpr_utils.hh index d9ba2abb..f83faacb 100644 --- a/src/constexpr_utils.hh +++ b/src/constexpr_utils.hh @@ -28,6 +28,9 @@ struct Array T m_data[N]; }; +template requires (std::is_same_v and ...) +Array(T, U...) -> Array; + template constexpr Array make_array(const T (&data)[N], std::index_sequence) { diff --git a/src/ranges.cc b/src/ranges.cc index 4fe2a418..b8fb6703 100644 --- a/src/ranges.cc +++ b/src/ranges.cc @@ -27,7 +27,7 @@ UnitTest test_ranges{[] { check_equal(R"(\\,\\,)"_sv | split(',', '\\') | transform(unescape<',', '\\'>), Strs{R"(\)", R"(\)", ""}); - check_equal(Array{{""_sv, "abc"_sv, ""_sv, "def"_sv, ""_sv}} | flatten(), "abcdef"_sv); + check_equal(Array{""_sv, "abc"_sv, ""_sv, "def"_sv, ""_sv} | flatten(), "abcdef"_sv); check_equal(Vector{"", ""} | flatten(), ""_sv); check_equal(Vector{} | flatten(), ""_sv); }};