https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106310
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 <set> 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 ‘void X::Derived<T>::f(const T&)’: t.cc:17:39: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Key, class _Compare, class _Alloc> class std::set’ 17 | this->template set< 0 >(arg); | ^ t.cc:17:39: note: expected a type, got ‘0’ t.cc:17:39: error: template argument 2 is invalid t.cc:17:39: error: template argument 3 is invalid