From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 32D67385801E; Tue, 18 Jan 2022 13:22:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 32D67385801E From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/104094] New: Alias template shown in diagnostic with wrong template parameter name Date: Tue, 18 Jan 2022 13:22:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone Message-ID: 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, 18 Jan 2022 13:22:56 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104094 Bug ID: 104094 Summary: Alias template shown in diagnostic with wrong template parameter name Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- template struct trait; template struct trait { using type =3D A; }; template struct cond { static constexpr bool value =3D true; }; template struct enable_if { using type =3D bool; }; template<> struct enable_if { }; template class pair { template using constraint =3D cond>; template::value>::type =3D t= rue> pair(E&&) { } }; pair p(1); GCC prints: name.C:18:14: error: 'pair::pair(E&&) [with E =3D int; typename enable_if >::value>::type =3D true; C =3D int]' is private within this context 18 | pair p(1); | ^ name.C:15:5: note: declared private here 15 | pair(E&&) { } | ^~~~ Why does it show cond> in the error? There is no D in that constructor's parameter list, and D is not explained in the [with ...] temp= late arg list. I think it should be shown as constraint or as cond>, but showi= ng D is just confusing.=