From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2A2A73858C55; Thu, 14 Jul 2022 23:46:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A2A73858C55 From: "lnicoara at thinkoid dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106310] New: Failure to resolve call to template member function in template base class. Date: Thu, 14 Jul 2022 23:46:46 +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.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: lnicoara at thinkoid dot 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 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: Thu, 14 Jul 2022 23:46:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106310 Bug ID: 106310 Summary: Failure to resolve call to template member function in template base class. Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: lnicoara at thinkoid dot org Target Milestone: --- The following test case fails to compile with gcc (and I believe it should correctly resolve the call to Base< T >::set): $ cat t.cc; g++ -c t.cc #include using namespace std; namespace X { template< typename T > struct Base { template< std::size_t > void set(T const &) { } }; template< typename T > struct Derived : Base< T > { void f(T const &arg) { this->template set< 0 >(arg); } }; } t.cc: In member function =E2=80=98void X::Derived::f(const T&)=E2=80=99: t.cc:17:39: error: type/value mismatch at argument 1 in template parameter = list for =E2=80=98template class std::= set=E2=80=99 17 | this->template set< 0 >(arg); | ^ t.cc:17:39: note: expected a type, got =E2=80=980=E2=80=99 t.cc:17:39: error: template argument 2 is invalid t.cc:17:39: error: template argument 3 is invalid=