From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 968AC3857C56; Sun, 21 Mar 2021 06:51:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 968AC3857C56 From: "webrown.cpp at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/99686] ICE when using both concepts and full specialization Date: Sun, 21 Mar 2021 06:51: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: 10.2.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: webrown.cpp at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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: Sun, 21 Mar 2021 06:51:30 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99686 W E Brown changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |webrown.cpp at gmail dot c= om --- Comment #2 from W E Brown --- Since C++ has no partial specializations of function templates, the test ca= se in Comment 1 is somewhat mischaracterized there. Instead, what we have in that test case are, first, two distinct primary templates that happen to share a common name within a single scope, and hen= ce overload that name. Note that these primary templates are distinguishable because one is more constrained (via its requires-clause) than the other (w= hich is unconstrained): whenever these primary templates produce equally viable candidates during overload resolution, C++ specifies that the more constrai= ned declaration should be selected. Finally, the test case defines a complete specialization, but which of the overloaded primary templates is being specialized? That's the real question for the compiler to determine in its role of language lawyer. Note that if= one of the two primary templates were removed from the test case, the compiler's decision would become near-trivial to make, as there would remain only a si= ngle candidate. If, instead, the explicit specialization were removed from the = test case, such a compiler determination would be no longer needed at all.=