From 81f687e29ae066b56c64405367fedc0b914d04c0 Mon Sep 17 00:00:00 2001 From: Jakub Mazurkiewicz Date: Thu, 22 Jan 2026 17:21:45 +0100 Subject: [PATCH 1/9] `P0896R4_ranges_range_machinery`: test `flat_meow` --- .../tests/P0896R4_ranges_range_machinery/test.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/std/tests/P0896R4_ranges_range_machinery/test.cpp b/tests/std/tests/P0896R4_ranges_range_machinery/test.cpp index 83bdb64bc35..e29d6d99a7b 100644 --- a/tests/std/tests/P0896R4_ranges_range_machinery/test.cpp +++ b/tests/std/tests/P0896R4_ranges_range_machinery/test.cpp @@ -27,6 +27,11 @@ #include #include +#if _HAS_CXX23 +#include +#include +#endif // _HAS_CXX23 + #include // Note that many tests herein assume: @@ -907,6 +912,14 @@ static_assert(test_std_container, std::contiguous_iterator_tag> static_assert(test_std_container, std::random_access_iterator_tag>()); static_assert(test_std_container()); +#if _HAS_CXX23 +static_assert(test_std_container, std::random_access_iterator_tag>()); +static_assert(test_std_container, std::random_access_iterator_tag>()); +// FIXME: Should `flat_(multi)set` iterators model `contiguous_iterator` concept when underlying does? +// static_assert(test_std_container, std::random_access_iterator_tag>()); +// static_assert(test_std_container, std::random_access_iterator_tag>()); +#endif // _HAS_CXX23 + // Validate that "old" fancy pointers that fail to model contiguous_iterator don't break contiguity of containers. template struct fancy_pointer { From 714a6c136aa2e2f0d85438f4d893cd1f547a9f57 Mon Sep 17 00:00:00 2001 From: Jakub Mazurkiewicz Date: Thu, 22 Jan 2026 15:56:00 +0100 Subject: [PATCH 2/9] `P1206R7_ranges_to_mappish`: Test `flat_map` and `flat_multimap` --- .../tests/P1206R7_ranges_to_mappish/test.cpp | 60 +++++++++++++++++-- 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/tests/std/tests/P1206R7_ranges_to_mappish/test.cpp b/tests/std/tests/P1206R7_ranges_to_mappish/test.cpp index 6ba6e3fa3bb..7c15710ded9 100644 --- a/tests/std/tests/P1206R7_ranges_to_mappish/test.cpp +++ b/tests/std/tests/P1206R7_ranges_to_mappish/test.cpp @@ -4,11 +4,15 @@ #include #include #include +#include +#include #include +#include #include #include #include #include +#include #include @@ -71,6 +75,20 @@ struct mappish_instantiator { template using apply = std::unordered_multimap, std::equal_to, Args...>; }; + template <> + struct deduce_container_impl { + template + using apply = std::flat_map, + std::vector::template rebind_alloc...>, + std::vector::template rebind_alloc...>>; + }; + template <> + struct deduce_container_impl { + template + using apply = std::flat_multimap, + std::vector::template rebind_alloc...>, + std::vector::template rebind_alloc...>>; + }; template