1 // RUN: %clang_cc1 -fsyntax-only -verify %s
4 template<class T2
> class B
{
9 template<> template<> class A
<int>::B
<double>;
10 template<> template<> void A
<char>::B
<char>::mf();
12 template<> void A
<char>::B
<int>::mf(); // expected-error{{requires 'template<>'}}
15 template <class> class A
{
21 template <> int AA::foo
= 0;
22 int AA::bar
= 1; // expected-error {{template specialization requires 'template<>'}}
23 int A
<float>::bar
= 2; // expected-error {{template specialization requires 'template<>'}}
25 template <> class A
<double> {
32 template <> int AB::foo
= 0; // expected-error{{extraneous 'template<>'}}
39 int i
<0>; // expected-error {{member 'i' cannot have template arguments}}
40 int j
<int>; // expected-error {{member 'j' cannot have template arguments}}
42 static int k
<12>; // expected-error {{template specialization requires 'template<>'}} \
43 expected
-error
{{no variable
template matches specialization
}}
44 void f
<12>(); // expected-error {{template specialization requires 'template<>'}} \
45 // expected-error {{no function template matches function template specialization 'f'}}
48 template <typename T
, int N
>
50 int i
<N
>; // expected-error {{member 'i' cannot have template arguments}}
51 int j
<T
>; // expected-error {{member 'j' cannot have template arguments}}
54 } // namespace GH54151