From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 53843383A30E; Mon, 6 Jun 2022 20:12:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 53843383A30E From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105841] [12/13 Regression] Change in behavior of CTAD for alias templates Date: Mon, 06 Jun 2022 20:12:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jun 2022 20:12:29 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105841 Jason Merrill changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW CC| |mike at spertus dot com Assignee|jason at gcc dot gnu.org |unassigned at gcc d= ot gnu.org --- Comment #2 from Jason Merrill --- In alias_ctad_tweaks, I wrote: /* This implementation differs from the [standard] in two significant way= s:=20=20=20 1) We include all template parameters of A, not just some.=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 2) The added constraint is same_type instead of deducible.=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 I believe that while it's probably possible to construct a testcase th= at=20=20=20 behaves differently with this simplification, it should have the same= =20=20=20=20=20=20 effect for real uses. Including all template parameters means that we= =20=20=20=20=20 deduce all parameters of A when resolving the call, so when we're in t= he=20=20=20 constraint we don't need to deduce them again, we can just check wheth= er=20=20=20 the deduction produced the desired result. */ This testcase is an example of why my assumption above was wrong. The effe= ct of the transformations specified by the standard would be roughly template struct B_deducible; template struct B_deducible> { }; template auto fp(BT, fTs...) -> A requires requires { B_deducible>(); }; decltype(fp(0,0)) b(0,0); which works. A year ago, Mike Spertus had a partial fix for this; any update on that?=