public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gasper.azman at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/110441] c++17: temporary causes static member function call to confuse required copy elision
Date: Wed, 28 Jun 2023 12:48:55 +0000	[thread overview]
Message-ID: <bug-110441-4-17Dw1eOsTT@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110441-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from Gašper Ažman <gasper.azman at gmail dot com> ---
Some more color from twitter, courtesy of @matthewecross:

Interestingly both "return S::f();" and "auto s = S(); return s.f();" both
pass.  It's only when you create a temporary instance of S in the return
statement that it fails.

  parent reply	other threads:[~2023-06-28 12:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-27 18:48 [Bug c++/110441] New: c++17 deferred materialization of temporaries fails when calling class static with member syntax eric.niebler at gmail dot com
2023-06-28 12:47 ` [Bug c++/110441] c++17: temporary causes static member function call to confuse required copy elision gasper.azman at gmail dot com
2023-06-28 12:48 ` gasper.azman at gmail dot com [this message]
2023-06-28 14:27 ` ppalka at gcc dot gnu.org
2023-06-28 14:30 ` ppalka at gcc dot gnu.org
2023-06-28 15:23 ` matt.cross+gcc-bugzilla at gmail dot com
2023-07-15 13:53 ` cvs-commit at gcc dot gnu.org
2023-07-15 14:00 ` ppalka 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-110441-4-17Dw1eOsTT@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: 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).