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 via email to