public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106310] New: Failure to resolve call to template member function in template base class.
@ 2022-07-14 23:46 lnicoara at thinkoid dot org
  2022-07-14 23:50 ` [Bug c++/106310] " pinskia at gcc dot gnu.org
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: lnicoara at thinkoid dot org @ 2022-07-14 23:46 UTC (permalink / raw)
  To: gcc-bugs

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2023-09-11 22:11 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-14 23:46 [Bug c++/106310] New: Failure to resolve call to template member function in template base class lnicoara at thinkoid dot org
2022-07-14 23:50 ` [Bug c++/106310] " pinskia at gcc dot gnu.org
2022-07-14 23:53 ` pinskia at gcc dot gnu.org
2022-07-14 23:55 ` [Bug c++/106310] [12/13 Regregression] lookup after this-> seems wrong for dependent lookup pinskia at gcc dot gnu.org
2022-07-15  7:57 ` [Bug c++/106310] [12/13 Regregression] lookup after this-> seems wrong for dependent lookup since r12-6754-g30f2c22def739211 marxin at gcc dot gnu.org
2022-07-18  7:30 ` rguenth at gcc dot gnu.org
2023-05-08 12:25 ` rguenth at gcc dot gnu.org
2023-07-12  3:24 ` [Bug c++/106310] [12/13/14 " pinskia at gcc dot gnu.org
2023-07-12  3:24 ` pinskia at gcc dot gnu.org
2023-07-26 14:40 ` [Bug c++/106310] [12/13/14 Regression] " jason at gcc dot gnu.org
2023-07-26 16:45 ` cvs-commit at gcc dot gnu.org
2023-07-26 19:25 ` [Bug c++/106310] [12/13 " jason at gcc dot gnu.org
2023-08-11 21:21 ` cvs-commit at gcc dot gnu.org
2023-08-11 21:22 ` cvs-commit at gcc dot gnu.org
2023-08-11 21:24 ` jason at gcc dot gnu.org
2023-09-08  9:10 ` fw at gcc dot gnu.org
2023-09-08 20:27 ` mpolacek at gcc dot gnu.org
2023-09-11 20:03 ` [Bug c++/106310] [11/12/13 " jason at gcc dot gnu.org
2023-09-11 22:11 ` [Bug c++/106310] [11 " cvs-commit at gcc dot gnu.org
2023-09-11 22:11 ` jason at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).