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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
LWG 3530 should mean we don't have to support such silly types.
https://wg21.link/lwg3530

However, we are still required to impose a total order on function pointers,
which means ranges::less/greater/less_equal/greater_equal are still
(potentially) broken, as for object pointers in PR 78420. We might get away
with it if the compiler doesn't do similar optimizations for function pointers,
but we used to say that about object pointers too, and it stopped being true.

As noted above, we don't have a way to detect that a relational comparison
would call a built-in operator on function pointers. Maybe what we want is a
__builtin_less_than(t, u) which is t < u but with a total order.

Reply via email to