From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A2CB938708D6; Wed, 26 Jun 2024 01:42:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A2CB938708D6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1719366160; bh=CiFvsrBi44wnB4wUSnEq4B3t4eB1wOZho2X+nsTmQ3g=; h=From:To:Subject:Date:From; b=f8J+OEsZIx0fYG7fgQprToQyCP54MtS/cfZbrN4TjrpVEiXjGUma4NHsBUgZmFC69 GsKTIipBnR7UEyA+iJaxndXdZRCGUTh+tb1vfwbiukGNNbAu5d+T9qqO1sPeO1SrOJ zoebyLO4OiUnlXCofpjwA2M5wjqzBDiollin2ddk= From: "s.murthy at outlook dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/115656] New: Templated ctor use rejected in non-deduced context if class template has template template parameter Date: Wed, 26 Jun 2024 01:42:39 +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: 14.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: s.murthy at outlook 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: bug_id short_desc product version bug_status 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D115656 Bug ID: 115656 Summary: Templated ctor use rejected in non-deduced context if class template has template template parameter Product: gcc Version: 14.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: s.murthy at outlook dot com Target Milestone: --- Using a class constructor in a non-deduced context (when no CTAD is being attempted, saying that in case my terminology is incorrect) causes an error= if the class template has a template template parameter (lass template A in repro). Oddly, the error disappears if CTAD is engaged before the erring co= de. This is a regression: no issue in GCC 10.5, but issue since GCC 11.1. Aside, clang accepts this code (from 11.0 to current version) PS: I searched the bug database and found no report matching this issue, bu= t I apologize if this issue is known. Repro below (online https://sigcpp.godbolt.org/z/M1eoE485x): ------------------------------------------------------------ //stub for use in class template A template class dv; //class template A with template template parameter template class V =3D dv > struct A=20 { U u_; A(U u) : u_(u) {}; template A(S s) : u_( s < 0 ? -s : s) {} }; //same as class A but no template template parameter template struct B=20 { U u_; B(U u) : u_(u) {}; template B(S s) : u_( s < 0 ? -s : s) {} }; int main() { //A a1(45ul); A a2(45l); //Error CGCC 11.5+: uncomment line above, the error disappea= rs B b2(45l); //OK }=