[Bug c++/94161] New: Implement DR 228: Use of template keyword with non-member templates

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Mar 12 23:26:43 GMT 2020


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

            Bug ID: 94161
           Summary: Implement DR 228: Use of template keyword with
                    non-member templates
           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: ---

This should compile:

template<typename T>
struct X {
    void f(); 
};

template<typename T>
struct Y {
  void g(X<T> x) {
    x.template X<T>::f();
  }
};

Since the DR says that the name prefixed by 'template' doesn't have to be a
member template.


More information about the Gcc-bugs mailing list