From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 22FCB3857802; Wed, 6 Oct 2021 14:15:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22FCB3857802 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98486] Variable template specialization doesn't account for primary's constraints Date: Wed, 06 Oct 2021 14:15:30 +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.0 X-Bugzilla-Keywords: accepts-invalid 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: 11.3 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: Wed, 06 Oct 2021 14:15:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98486 --- Comment #2 from CVS Commits --- The releases/gcc-11 branch has been updated by Patrick Palka : https://gcc.gnu.org/g:729cf2ea979f396e706625b1669087d5920b8c2a commit r11-9081-g729cf2ea979f396e706625b1669087d5920b8c2a Author: Patrick Palka Date: Thu Sep 16 15:03:55 2021 -0400 c++: constrained variable template issues [PR98486] This fixes some issues with constrained variable templates: - Constraints aren't checked when explicitly specializing a variable template. - Constraints aren't attached to a static data member template at parse time. - Constraints don't get propagated when (partially) instantiating a static data member template, so we need to make sure to look up constraints using the most general template during satisfaction. PR c++/98486 gcc/cp/ChangeLog: * constraint.cc (get_normalized_constraints_from_decl): Always look up constraints using the most general template. * decl.c (grokdeclarator): Set constraints on a static data member template. * pt.c (determine_specialization): Check constraints on a variable template. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-var-templ1.C: New test. * g++.dg/cpp2a/concepts-var-templ1a.C: New test. * g++.dg/cpp2a/concepts-var-templ1b.C: New test. (cherry picked from commit 2e2e65a46d2674bed53afd211493876ee2b79453)=