]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Directly implement ranges::stable_sort [PR100795]
authorPatrick Palka <ppalka@redhat.com>
Fri, 27 Jun 2025 17:53:29 +0000 (13:53 -0400)
committerPatrick Palka <ppalka@redhat.com>
Fri, 27 Jun 2025 17:53:29 +0000 (13:53 -0400)
commit04c597c05494e38cc9c231581737c1d7d7579e51
tree1061fb36c7ad0a227e6dc1608dac3d06fde95c8b
parent9d3467a14bbd75469f114b047590ebbffa4a9c8b
libstdc++: Directly implement ranges::stable_sort [PR100795]

PR libstdc++/100795

libstdc++-v3/ChangeLog:

* include/bits/ranges_algo.h (__detail::__move_merge): New,
based on the stl_algo.h implementation.
(__detail::__merge_sort_loop): Likewise.
(__detail::__chunk_insertion_sort): Likewise.
(__detail::__merge_sort_with_buffer): Likewise.
(__detail::__stable_sort_adaptive): Likewise.
(__detail::__stable_sort_adaptive_resize): Likewise.
(__detail::__inplace_stable_sort): Likewise.
(__stable_sort_fn::operator()): Reimplement in terms of the above.
* testsuite/25_algorithms/stable_sort/constrained.cc:

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/include/bits/ranges_algo.h
libstdc++-v3/testsuite/25_algorithms/stable_sort/constrained.cc