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

            Bug ID: 94336
           Summary: template keyword accepted before destructor names
           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: ---

We accept the following:

template<typename T> void f(T *p) { p->template ~X(); }
template<typename T> struct X {};
void g(X<int> *p) { f(p); }

but arguably we shouldn't because [temp.names]/5: A name prefixed by the
keyword template shall be a template-id or the name shall refer to a class
template or an alias template.

Reply via email to