public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Marek Polacek <polacek@redhat.com>
To: Gerald Pfeifer <gerald@pfeifer.com>
Cc: gcc-patches@gcc.gnu.org, Jonathan Wakely <jwakely@redhat.com>
Subject: Re: [wwwdocs] porting_to: Two-stage overload resolution for implicit move removed
Date: Mon, 19 Aug 2024 16:53:02 -0400	[thread overview]
Message-ID: <ZsOwrleotSKSAJ_t@redhat.com> (raw)
In-Reply-To: <1892d73a-c210-358c-fe40-c1bafc17fd13@pfeifer.com>

On Mon, Aug 19, 2024 at 10:51:28PM +0200, Gerald Pfeifer wrote:
> On Wed, 12 Oct 2022, Marek Polacek via Gcc-patches wrote:
> > +<p>
> > +The two overload resolutions approach was complicated and quirky, so users
> > +should transition to the newer model.  This change means that code that
> > +previously didn't compile in C++17 will now compile, for example:</p>
> 
> I looked at this recently and am wondering whether there is a word
> missing: "two overload" -> "two-stage overload"?
> 
> If so, the patch below addresses that
> 
> On the way, I changed "[code] will now compile" to "[code] may now 
> compile", since not every code that failed to compile before will now 
> compile (e.g., syntactically incorrect code).
> 
> What do you think?

LGTM, thanks.
 
> diff --git a/htdocs/gcc-13/porting_to.html b/htdocs/gcc-13/porting_to.html
> index c727d66f..e595e120 100644
> --- a/htdocs/gcc-13/porting_to.html
> +++ b/htdocs/gcc-13/porting_to.html
> @@ -82,9 +82,10 @@ not in C++17).  Then C++23 <a href="https://wg21.link/p2266">P2266</a>
>  removed the fallback overload resolution, and changed the implicit move
>  rules once again.</p>
>  
> -<p>The two overload resolutions approach was complicated and quirky, so users
> -should transition to the newer model.  This change means that code that
> -previously didn't compile in C++17 will now compile, for example:</p>
> +<p>The two-stage overload resolutions approach was complicated and
> +quirky, so users should transition to the newer model.  This change
> +means that code that previously didn't compile in C++17 may now
> +compile, for example:</p>
>  
>  <pre><code>
>     struct S1 { S1(S1 &&); };
> 

Marek


  reply	other threads:[~2024-08-19 20:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12 19:38 Marek Polacek
2022-10-12 20:50 ` Jonathan Wakely
2022-10-12 22:24   ` Marek Polacek
2022-10-12 22:38     ` Jonathan Wakely
2022-10-12 22:44       ` Marek Polacek
2024-08-19 20:51 ` Gerald Pfeifer
2024-08-19 20:53   ` Marek Polacek [this message]
2024-08-19 21:34   ` Jonathan Wakely
2024-08-19 21:35     ` Jonathan Wakely
2024-08-19 22:09     ` Marek Polacek

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=ZsOwrleotSKSAJ_t@redhat.com \
    --to=polacek@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gerald@pfeifer.com \
    --cc=jwakely@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).