On Wed, 2 Oct 2024 at 17:39, Jonathan Wakely <jwak...@redhat.com> wrote: > > On Wed, 25 Sept 2024 at 18:22, François Dumont <frs.dum...@gmail.com> wrote: > > > > Hi > > > > Once https://gcc.gnu.org/pipermail/libstdc++/2024-September/059568.html > > will be accepted we will be able fix this long lasting issue that > > std::stable_sort and std::inplace_merge are forcing the functor to take > > const& parameters even when iterators used in range are not const ones. > > https://cplusplus.github.io/LWG/issue3031 said that's OK.
And ... I guess that means we don't need to worry about the non-const X::operator<(X&) case? Before C++20 the standard implied it should work, and that's what we've traditionally supported. But maybe we can stop supporting that, if we treat the C++20 change as a DR for previous standards? Hmm. That would make your clean-up a lot simpler. That's what you had in the earlier patch, right?