From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 554A1395B073; Tue, 3 May 2022 19:21:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 554A1395B073 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105351] [concepts] Constraint checking does correctly match static member attributes Date: Tue, 03 May 2022 19:21:45 +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: 11.2.0 X-Bugzilla-Keywords: 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: Tue, 03 May 2022 19:21:45 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105351 --- Comment #7 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:a16fc9f1c96c7361d0b7a83a06f3649ace6c440d commit r13-95-ga16fc9f1c96c7361d0b7a83a06f3649ace6c440d Author: Patrick Palka Date: Tue May 3 15:21:26 2022 -0400 c++: make finish_non_static_data_member SFINAE enabled [PR105351] Here since finish_non_static_data_member isn't SFINAE enabled, we incorrectly emit an error when considering the first overload rather than silently discarding it: sfinae33.C: In substitution of =C3=A2template A f() = [with T =3D B]=C3=A2: sfinae33.C:11:7: required from here sfinae33.C:5:31: error: invalid use of non-static data member =C3=A2B::value=C3=A2 5 | template A f(); | ^ This patch makes the function SFINAE enabled in the usual way: give it a complain parameter, check it before emitting an error, and pass it thro= ugh appropriately. PR c++/105351 gcc/cp/ChangeLog: * cp-tree.h (finish_non_static_data_member): Add defaulted complain parameter. * pt.cc (tsubst_copy_and_build): Pass complain to finish_non_static_data_member. * semantics.cc (finish_non_static_data_member): Respect complain parameter. (finish_qualified_id_expr): Pass complain to finish_non_static_data_member. gcc/testsuite/ChangeLog: * g++.dg/template/sfinae33.C: New test.=