From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F1C5D3893640; Mon, 12 Jul 2021 20:35:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F1C5D3893640 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/79501] member deduction guide not recognized Date: Mon, 12 Jul 2021 20:35:40 +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: 7.0.1 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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, 12 Jul 2021 20:35:41 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D79501 --- Comment #4 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:8d75b8830e9dafb4e0c400c723653512adf40295 commit r12-2260-g8d75b8830e9dafb4e0c400c723653512adf40295 Author: Patrick Palka Date: Mon Jul 12 16:35:18 2021 -0400 c++: permit deduction guides at class scope [PR79501] This adds support for declaring (class-scope) deduction guides for a member class template. Fortunately it seems only a couple of changes are needed in order for the existing CTAD machinery to handle them properly: we need to make sure to give them a FUNCTION_TYPE instead of a METHOD_TYPE, and we need to avoid using a BASELINK when looking them up. PR c++/79501 PR c++/100983 gcc/cp/ChangeLog: * decl.c (grokfndecl): Don't require that deduction guides are declared at namespace scope. Check that class-scope deduction guides have the same access as the member class template. (grokdeclarator): Pretend class-scope deduction guides are stat= ic. * search.c (lookup_member): Don't use a BASELINK for (class-sco= pe) deduction guides. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/class-deduction92.C: New test. * g++.dg/cpp1z/class-deduction93.C: New test. * g++.dg/cpp1z/class-deduction94.C: New test. * g++.dg/cpp1z/class-deduction95.C: New test.=