public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/93628] ranges::equal_to doesn't work for types convertible to function pointers Date: Tue, 09 Mar 2021 11:17:27 +0000 [thread overview] Message-ID: <bug-93628-4-Bcbe5dH6Yr@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-93628-4@http.gcc.gnu.org/bugzilla/> 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.
next prev parent reply other threads:[~2021-03-09 11:17 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-93628-4@http.gcc.gnu.org/bugzilla/> 2020-04-15 19:36 ` redi at gcc dot gnu.org 2021-03-09 11:17 ` redi at gcc dot gnu.org [this message] 2021-03-10 15:28 ` cvs-commit at gcc dot gnu.org 2021-03-29 20:03 ` cvs-commit at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-93628-4-Bcbe5dH6Yr@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).