https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100795
--- Comment #17 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>: https://gcc.gnu.org/g:9d3467a14bbd75469f114b047590ebbffa4a9c8b commit r16-1742-g9d3467a14bbd75469f114b047590ebbffa4a9c8b Author: Patrick Palka <ppa...@redhat.com> Date: Fri Jun 27 13:53:26 2025 -0400 libstdc++: Directly implement ranges::inplace_merge [PR100795] As with the previous patch, this patch reimplements ranges::inplace_merge directly instead of incorrectly forwarding to std::inplace_merge. In addition to the compatibility changes listed in the previous patch we also: - explicitly cast the difference type (which can be an integer class) to ptrdiff_t when constructing a _Temporary_buffer PR libstdc++/100795 libstdc++-v3/ChangeLog: * include/bits/ranges_algo.h (__detail::__move_merge_adaptive): New, based on the stl_algo.h implementation. (__detail::__move_merge_adaptive_backward): Likewise. (__detail::__rotate_adaptive): Likewise. (__detail::__merge_adaptive): Likewise. (__detail::__merge_adaptive_resize): Likewise. (__detail::__merge_without_buffer): Likewise. (__inplace_merge_fn::operator()): Reimplement in terms of the above. * testsuite/25_algorithms/inplace_merge/constrained.cc (test03): New test. Reviewed-by: Jonathan Wakely <jwak...@redhat.com>