http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55588



             Bug #: 55588

           Summary: Failure to diagnose non-template-id prefixed by

                    keyword template

    Classification: Unclassified

           Product: gcc

           Version: 4.8.0

            Status: UNCONFIRMED

          Keywords: accepts-invalid

          Severity: normal

          Priority: P3

         Component: c++

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: r...@gcc.gnu.org





This example is taken from 14.2 [temp.names] p5



template <class T> struct A {

  void f(int);

  template <class U> void f(U);

};

template <class T> void f(T t) {

  A<T> a;

  a.template f<>(t);  // OK: calls template

  a.template f(t);    // error: not a template-id

}



G++ compiles it without error (as does Clang++, but not Comeau online)

Reply via email to