https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81026

            Bug ID: 81026
           Summary: Lookup of dependent member template incorrectly finds
                    non-member
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Casey at Carter dot net
  Target Milestone: ---

GCC 4/5/6/7/8 diagnose this correct program:

namespace std {
    template<class> struct extent;
}

using namespace std;

template <class T>
struct S {
    void f() { T{}.template extent<42>(); }
};

with:

prog.cc: In member function 'void S<T>::f()':
prog.cc:9:38: error: type/value mismatch at argument 1 in template parameter
list for 'template<class> struct std::extent'
     void f() { T{}.template extent<42>(); }
                                      ^
prog.cc:9:38: note:   expected a type, got '42'

Reply via email to