From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hamza.pair.com (hamza.pair.com [209.68.5.143]) by sourceware.org (Postfix) with ESMTPS id A3541384A452 for ; Mon, 19 Aug 2024 20:51:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A3541384A452 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=pfeifer.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=pfeifer.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A3541384A452 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.68.5.143 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724100693; cv=none; b=lEkP4Fv8cMIGqRwjLH++dy0QmqZHGP2+qDH/PbbPYXCpCxVAjr5unXuGFLHtv2j2ujk8WmlbYYtL4TFce8353JSZKAJE3gG/4F5pg4t6awXLcZNyEO+kkXHqC172yfWRIq5wv5Mp3RYuXeD8IFB0yBBQnGnyguKC1uz39iH1xfQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724100693; c=relaxed/simple; bh=J4cjh3u6m3C+Lw9OBV+1gH4x5qDgAm2odME3B1QK7wU=; h=Date:From:To:Subject:Message-ID:MIME-Version:DKIM-Signature; b=XrPvsatNogcolf3iQL+1VJxkXTE2AZXeT5Ak5hdSvLuxhSLs1rROhLthUmPcho3Ca3/0uIk3dnwcx3x8lk+3JAftyydk1EBpG8A5R7Lv3/LUGU+4c+XJVtZgC1OZjJa4Ne0B1vRutwTU+tX9i3hRs2NEon1DmLMon7PjBVLXIhU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from hamza.pair.com (localhost [127.0.0.1]) by hamza.pair.com (Postfix) with ESMTP id 5EB7A33E8C; Mon, 19 Aug 2024 16:51:31 -0400 (EDT) Received: from daya.localdomain (188-23-62-115.adsl.highway.telekom.at [188.23.62.115]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by hamza.pair.com (Postfix) with ESMTPSA id 8256D33E85; Mon, 19 Aug 2024 16:51:30 -0400 (EDT) Date: Mon, 19 Aug 2024 22:51:28 +0200 (CEST) From: Gerald Pfeifer To: Marek Polacek cc: gcc-patches@gcc.gnu.org, Jonathan Wakely Subject: Re: [wwwdocs] porting_to: Two-stage overload resolution for implicit move removed In-Reply-To: Message-ID: <1892d73a-c210-358c-fe40-c1bafc17fd13@pfeifer.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pfeifer.com; h=date:from:to:cc:subject:in-reply-to:message-id:references:mime-version:content-type; s=pair-202402271039; bh=9doAsjElt7H2znxte1VPVWf1VR1l+EfX0oPue8yhiQA=; b=kKl02vRz7dDKBCh4GMiOPaM7mOYkJ7OEVCJCeT6HCD76Z7hZ3xauOByhEPL8dnbI9a7z7elNoAa01MvAf/n6qAxUa6LOb8ZDpjPadPFQN3PButk5RT9yEHetc6DoiGZdF9kjgah+9EWhL9ebTXoL1nGkNhGbAuo+PI3f8QtV8KU5CA3GbnpdjVt2WvWTP2xBTN84qu+8U9Polcm11EfMinDntK5NP+QVKtXtcwa7t0aurPHTPWN/LDdv4aavCKkiifWCwwlJSLwFYR6CxQknrSlSoH5V3O2CfEhAsdHiyj1iqrDeVpcLLx3MndV8Pqnu9eDxCvKFLe5RwP+sYuKqPg== X-Scanned-By: mailmunge 3.11 on 209.68.5.143 X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_NONE,SPF_PASS,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 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? 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 &&); };