https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126083
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2026-07-02
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
We don't forward the dereferenced values to the ordering predicate:
auto&& __val = *__first;
if (__comp_proj(__val, __result.min))
The indirect_strict_weak_order<projected<iterator_t<R>, Proj>> constraint means
we should use the correct value category, and then it's UB if the
regular_invocable predicate modifies the values it's called with.
But really, it's absurd to have a predicate that only accepts rvalues, given
that it's not allowed to modify them. So I can't say I really care about this.