1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 template<class T
> struct A
{
4 template<class X1
> void g1(T
, X1
);
5 template<class X2
> void g2(T
, X2
);
10 template<> void A
<int>::f(int);
12 // out of class member template definition
13 template<class T
> template<class X1
> void A
<T
>::g1(T
, X1
) { }
15 // member template specialization
16 template<> template<class X1
> void A
<int>::g1(int, X1
);
18 // member template specialization
20 void A
<int>::g1(int, char); // X1 deduced as char
23 void A
<int>::g2
<char>(int, char); // X2 specified as char
24 // member specialization even if defined in class definition
26 template<> void A
<int>::h(int) { }
37 void Test
<T
>::get
<double>(double i
) {} // expected-error{{cannot specialize (with 'template<>') a member of an unspecialized template}}