On Thu, 28 May 2026 at 07:22, Tomasz Kaminski <[email protected]> wrote:
>
>
>
> On Wed, May 27, 2026 at 6:23 PM Patrick Palka <[email protected]> wrote:
>>
>> Changes in v2:
>>
>>   - Bump FTM as per the paper
>>   - Fix invariant preservation of flat_meow::swap in case of exception
>>   - Use ranges::swap instead of ADL swap in flat_set::swap
>>   - Make flat_meow::swap swap the comparator last
>>   - Add missing flat_set::insert_range(sorted_foo_t, Rg&&) overload
>>   - Clean up test, check .empty() alongside .keys().empty() and
>>     .values.empty(), and don't bother doing .extract().
>>
>> -- >8 --
>>
>> This implements the changes in sections 5, 6 and 8 of P3567R2; the
>> changes in section 4 and 7 are already effectively implemented.
>>
>> libstdc++-v3/ChangeLog:
>>
>>         * include/bits/version.def (flat_map): Bump to 202511.
>>         (flat_set): Likewise.
>>         * include/bits/version.h: Regenerate.
>>         * include/std/flat_map (_Flat_map_impl): Remove
>>         is_nothrow_swappable_v assertions.
>>         (_Flat_map_impl::_Flat_map_impl): Explicitly default copy ctor.
>>         Define move ctor with corrected exception handling as per
>>         P3567R2.
>>         (_Flat_map_impl::operator=): Likewise.
>>         (_Flat_map_impl::insert_range): Define new __sorted_t overload
>>         as per P3567R2.
>>         (_Flat_map_impl::swap): Make conditionally noexcept as per
>>         P3567R2.
>>         * include/std/flat_set (_Flat_set_impl): Remove
>>         is_nothrow_swappable_v assertion.
>>         (_Flat_set_impl::_Flat_set_impl): Explicitly default copy ctor.
>>         Define move ctor with correct invariant preserving behavior as
>>         per P3567R2.
>>         (_Flat_set_impl::operator=): Likewise.
>>         (_Flat_set_impl::_M_insert_range): Factored out from
>>         insert_range.  Add bool parameter __is_sorted defaulted to
>>         false.
>>         (_Flat_set_impl::insert_range): Define new __sorted_t overload
>>         as per P3567R2.
>>         (_Flat_set_impl::swap): Make conditionally noexcept as per
>>         P3567R2.  Correct to use ranges::swap instead of ADL swap.
>>         * libstdc++-v3/testsuite/23_containers/flat_map/1.cc
>>         (test11, test12): New tests.
>>         * libstdc++-v3/testsuite/23_containers/flat_multimap/1.cc
>>         (test10, test11): New tests.
>>         * libstdc++-v3/testsuite/23_containers/flat_multiset/1.cc
>>         (test10, test11): New tests.
>>         * libstdc++-v3/testsuite/23_containers/flat_set/1.cc
>>         (test10, test11): New tests.
>> ---
>>  libstdc++-v3/include/bits/version.def         |   4 +-
>>  libstdc++-v3/include/bits/version.h           |   8 +-
>>  libstdc++-v3/include/std/flat_map             |  55 +++++++++-
>>  libstdc++-v3/include/std/flat_set             |  70 ++++++++++--
>>  .../testsuite/23_containers/flat_map/1.cc     | 103 +++++++++++++++++-
>>  .../23_containers/flat_multimap/1.cc          | 101 +++++++++++++++++
>>  .../23_containers/flat_multiset/1.cc          |  94 ++++++++++++++++
>>  .../testsuite/23_containers/flat_set/1.cc     |  96 +++++++++++++++-
>>  8 files changed, 508 insertions(+), 23 deletions(-)
>>
>> diff --git a/libstdc++-v3/include/bits/version.def 
>> b/libstdc++-v3/include/bits/version.def
>> index 2f32a8bda98f..5d795151ec67 100644
>> --- a/libstdc++-v3/include/bits/version.def
>> +++ b/libstdc++-v3/include/bits/version.def
>> @@ -1899,7 +1899,7 @@ ftms = {
>>  ftms = {
>>    name = flat_map;
>
> The changes look good to me, with only small suggestion below.
>
> Could you add comments with paper numbers to FTMs, like we have
> in other cases:
>      // 202207 P0429R9 A Standard flat_map
>      // 202511 P3567R2 flat_meow Fixes

Yes please

>>
>>    values = {
>
>           v = 202207;
>>
>> +    v = 202511; //  P3567R2 applied as DR for C++23
>>      cxxmin = 23;
>>    };
>>  };
>> @@ -1907,7 +1907,7 @@ ftms = {
>>  ftms = {
>
> Similary here:
>  // 202207 P1222R4 A Standard flat_set
>  //              LWG3751 Missing feature macro for flat_set
>  //  202511 P3567R2 flat_meow Fixes
>>
>>    name = flat_set;
>>    values = {
>> -    v = 202207;
>> +    v = 202511;
>>      cxxmin = 23;
>>    };
>>  };

Reply via email to