From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 092DC3858D35; Sat, 6 Apr 2024 02:45:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 092DC3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712371525; bh=WUPc0ZZgGuArbxjVVehodewG+jFTBAE86stsxT4yqDw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NQp5cGGzpNPjhLpugufFclCxITMtbAPvnQoE7Q1reeQ9VMDofwdFGTjsMMoRLO77r AtNGHMHcQNrrXgYIfuHv7k2GGzGx7ghcAfB0dwTRKwSZ3+vggIIIXaYnsB4ZUOUYp0 qtZD5iEAiRI2igzzIDoT3fIrUd/sLSVMA5yOb5WQ= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/91798] Compiler rejects code due to template specialization of auto parameter value. Date: Sat, 06 Apr 2024 02:45:24 +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: 8.1.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: SUSPENDED 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: bug_status 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D91798 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |SUSPENDED --- Comment #5 from Andrew Pinski --- https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1647 And maybe others. Note my other testcase was a full specialization rather than a partial. Here is one with a partial which removes the variadic : ``` //Get type parameter at given index. template struct param { static_assert(i > 0, "Index into parameter pack cannot be negative!"); using type =3D typename param::type; }; template struct param<0, T> { using type =3D T; }; int main() { typename param<0u, int>::type x =3D 'a'; static_cast(x); } ``` Both GCC and EDG agree on this while clang and MSVC disagree. This is definitely DR 1647 then.=20 So suspended as the defect report is still active.=