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

            Bug ID: 125292
           Summary: Lookup through injected-class-name fails in type-only
                    context
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: herring at lanl dot gov
  Target Milestone: ---

Consider <https://godbolt.org/z/cTdvn9Mv6>:

template<class T> struct id {using type=T;};
template<class T> struct D : id<T> {
    void f(/*typename*/ D::type t);
};

void g(D<int> d) {d.f(0);}

GCC incorrectly rejects the template definition without the pre-C++20
"typename", as if lookup should be performed immediately for that dependent
name.

Reply via email to