From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id B439B384A4B5 for ; Mon, 19 Aug 2024 21:34:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B439B384A4B5 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B439B384A4B5 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724103280; cv=none; b=Cd6VBIwDW79wAlCyR+9Stl3oJ+X35RIfj20IgKOTWNKhkTcKrGuLeJAXhqmKeWLHkpemai4mdXm/SPM4kqZ6S9xN8U+EWJzniSawHjZLFvm2DF+dqoLqilNXrBNmPZ+uUddefhwpj00OkIh5bbGu9Ugwr2Cxc840m+DVyi9rlb0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724103280; c=relaxed/simple; bh=noWFOmkpx7ZldYtTQwHAclp6CZR+NuGL8wnaY3SD3vE=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=jzVdlP5jlh/7czW90VzRKkMTjT7SJJF6kMZTAMwT3s1m0PxGglbSjX0/siSHNGpAAC9HxYZDFR3Qlq835roW60+34HS80m2FcUZdDADgzh6EwOBYGu7qZYYDliETgRj8saO10L7bsRz0qdy7ZxKvKYLHjwdYB6bPvZTU/NiTCpo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724103278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QeOeO/9IApxUVyaL76hJhSOvmg4cUM0VnmDHs8Cz8EA=; b=ducxXEV4p7g6Ye39OzPqjOK+1aipIayfMDB4Pj9+sCMI4V6r/O46cZk4/Za3go7AXYnjc5 wf6SuwDx9wtXvz+SR5tvdAH4eHn88QTcswm+B2Rfba07UY2jDsQJ5ZskyKOxItV0GIwxPL 9HbmCCg+eqkcDgXGx1Mra3lexrpZvj4= Received: from mail-yw1-f200.google.com (mail-yw1-f200.google.com [209.85.128.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-447-p7fZO0R7OyeW6M1iixLKSQ-1; Mon, 19 Aug 2024 17:34:37 -0400 X-MC-Unique: p7fZO0R7OyeW6M1iixLKSQ-1 Received: by mail-yw1-f200.google.com with SMTP id 00721157ae682-69a0536b23aso85043717b3.3 for ; Mon, 19 Aug 2024 14:34:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724103277; x=1724708077; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QeOeO/9IApxUVyaL76hJhSOvmg4cUM0VnmDHs8Cz8EA=; b=kcI7NKF8TrL518y1Qb5nlXmrSsSdgBJrpKpKD+fFESV2SfCCVSlEHRYP+e6HIgkneI uGcbQcb5ySkoKyDJQo711h4jtzn8BFEP4Zq1wt8GcqhuOApbA+7QK3ojOkslc39rQlFq neK7wLlGAFJFt10n3TSt+Wg00YRDttC8yhiNPmLPJOhThxutQk8WthPrkTouNisGqLb4 xXvUh30T9rJDWBoGh2rKx75YLhkP867VOSzOs9tfu61lRK/Qe8G/Nj+mQFg/Uj9yPsWR qP5Oa3e+N9iFMmCGiYehF0yELH9Pb0Zu46LNsk51VVAohYLF7Ux82L5iPB3SnfoA6Xhq 83vQ== X-Forwarded-Encrypted: i=1; AJvYcCXZWErThJ5Qadct2oDameZjppvYzSZXh26KM7tFw3d2e+5/ZUxUBhVKvrTHptgCjwdePB4RQm26nJctVjegv7x2yL+01kafaw== X-Gm-Message-State: AOJu0Yx9bUXXG+9S6If2EL31cDswOfrG1m81zRZCXb1w/wVQ5MgfVZzM ZrjspDVHAqKaREpq6NjPHH58LKY2fdyJAwBBNEbNsxs4NWSB48pohfqPXBmIpljiwRbbrMDvOx/ HERst4WGI96CB30GCHNvX7Dg1hWo3Xi1sIS9kW1KqbQXB0U4/QM/9DJvJIFkEAFaBTVnXhsy5GA srzYLDONg6b62MwS8OcmBCSJ0Zn+g6Ow== X-Received: by 2002:a05:690c:250f:b0:64a:7e85:9a94 with SMTP id 00721157ae682-6b1b8fccf72mr116559897b3.21.1724103276846; Mon, 19 Aug 2024 14:34:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEqlNKRmMt0Y7FTF9KdD31JlQpN8e4YC3CXpPg5bPU4eKQ8Jqf0UDljUYhPKw3OQlwlgweloyaTRQ1f2WtipDc= X-Received: by 2002:a05:690c:250f:b0:64a:7e85:9a94 with SMTP id 00721157ae682-6b1b8fccf72mr116559797b3.21.1724103276540; Mon, 19 Aug 2024 14:34:36 -0700 (PDT) MIME-Version: 1.0 References: <1892d73a-c210-358c-fe40-c1bafc17fd13@pfeifer.com> In-Reply-To: <1892d73a-c210-358c-fe40-c1bafc17fd13@pfeifer.com> From: Jonathan Wakely Date: Mon, 19 Aug 2024 22:34:20 +0100 Message-ID: Subject: Re: [wwwdocs] porting_to: Two-stage overload resolution for implicit move removed To: Gerald Pfeifer Cc: Marek Polacek , gcc-patches@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, 19 Aug 2024 at 21:51, Gerald Pfeifer wrote: > > On Wed, 12 Oct 2022, Marek Polacek via Gcc-patches wrote: > > +

> > +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:

> > 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? No, it should either be "two-stage overload resolution" or leave it unchanged. But "two-stage overload resolutions" (plural) is wrong. > > Gerald > > > 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 P2266 > removed the fallback overload resolution, and changed the implicit move > rules once again.

> > -

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:

> +

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:

> >

>     struct S1 { S1(S1 &&); };
>