https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111963

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2025-09-18

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #1)
> The internal functions like __partition could just take forwarding
> references to the predicates, at least for C++11 and later.

Passing them by reference involves an indirection which could be a
pessimization. Users who want pass-by-reference can use std::ref.

But we could use _GLIBCXX_MOVE(__pred) so that we do moves instead of copies.

Reply via email to