// RUN: %clang_cc1 -fsyntax-only -verify %s // RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s template struct vector; // C++ [temp.class.spec]p6: namespace N { namespace M { template struct A; #if __cplusplus <= 199711L // C++03 or earlier modes // expected-note@-2{{explicitly specialized declaration is here}} #endif } } template struct N::M::A { }; #if __cplusplus <= 199711L // expected-warning@-2{{first declaration of class template partial specialization of 'A' outside namespace 'M' is a C++11 extension}} #endif // C++ [temp.class.spec]p9 // bullet 1 template struct A {}; template struct A {}; // expected-error{{depends on}} template struct B {}; template struct B {}; //OK // bullet 2 template struct C {}; // expected-note{{declared here}} template struct C; // expected-error{{specializes}} template struct C; // okay template< int X, int (*array_ptr)[X] > class A2 {}; // expected-note{{here}} int array[5]; template< int X > class A2 { }; // expected-error{{specializes}} template class TT> struct Test0; // bullet 3 template class TT> struct Test0; // expected-error{{does not specialize}} // C++ [temp.class.spec]p10 template class TT = ::vector> // expected-error{{default template argument}} struct Test0 { }; template struct Test1; template // expected-note{{non-deducible}} struct Test1 { }; // expected-warning{{never be used}}