public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Patrick Palka <ppalka@redhat.com>
Cc: Jason Merrill <jason@redhat.com>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] c++: fold calls to std::move/forward [PR96780]
Date: Thu, 10 Mar 2022 15:32:21 +0000	[thread overview]
Message-ID: <CAH6eHdQyhvnBNyBwfKpzTkvXnJ9JQH5mCmYh6sPoUrZ6c+A+cw@mail.gmail.com> (raw)
In-Reply-To: <6b2257e0-cd0f-4771-7c12-1be4dbf88423@idea>

On Thu, 10 Mar 2022 at 15:27, Patrick Palka wrote:
> Here's a patch that extends the folding to as_const and addressof (as
> well as __addressof, which I'm kind of unsure about since it's
> non-standard).

N.B. libstdc++ almost never uses std::addressof, because that calls
std::__addressof, so we just use that directly to avoid the double
indirection. I plan to change that in stage 1 and make std::addressof
just call the built-in directly, so that it won't have the extra
overhead. If they both get folded that wouldn't matter so much (it
would still be useful for Clang, and would presumably make GCC compile
ever so slightly faster).

  reply	other threads:[~2022-03-10 15:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-01 22:08 Patrick Palka
2022-03-10  4:09 ` Jason Merrill
2022-03-10 15:27   ` Patrick Palka
2022-03-10 15:32     ` Jonathan Wakely [this message]
2022-03-12  1:31     ` Jason Merrill
2022-03-14 17:13       ` Patrick Palka
2022-03-14 22:20         ` Jason Merrill
2022-03-15 14:03           ` Patrick Palka
2022-03-15 15:38             ` Jason Merrill
2022-03-15 17:09               ` Patrick Palka
2022-03-15 21:03                 ` Jason Merrill

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=CAH6eHdQyhvnBNyBwfKpzTkvXnJ9JQH5mCmYh6sPoUrZ6c+A+cw@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=ppalka@redhat.com \
    /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: link
Be 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).