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

            Bug ID: 94405
           Summary: [temp.names]p4 not fully implemented
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

<https://eel.is/c++draft/temp.names#4.sentence-2> says "In a qualified-id of a
declarator-id or in a qualified-id formed by a class-head-name or
enum-head-name, the keyword template shall not appear at the top level." so the
following probably shouldn't compile:

template<typename T> struct A {
  template<typename U> struct B;
  template<typename U> struct B<U*>;
};
template<typename T> template<typename U> struct A<T>::template B<U*> {};

Reply via email to