1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 template<typename T
, typename U
> // expected-note{{previous template}}
10 void f0(const T
&, const U
&);
12 T
& operator[](int i
) const;
14 void f1(size_type
) const;
15 void f2(size_type
) const;
16 void f3(size_type
) const;
24 template<typename T
, typename U
>
25 void X0
<T
, U
>::f0(const T
&, const U
&) { // expected-note{{previous definition}}
28 template<class X
, class Y
>
29 X
& X0
<X
, Y
>::operator[](int i
) const {
34 template<class X
, class Y
>
35 void X0
<X
, Y
>::f1(int) const { }
37 template<class X
, class Y
>
38 void X0
<X
, Y
>::f2(size_type
) const { }
40 template<class X
, class Y
, class Z
> // expected-error{{too many template parameters}}
41 void X0
<X
, Y
>::f3(size_type
) const {
44 template<class X
, class Y
>
45 void X0
<Y
, X
>::f4() { } // expected-error{{does not refer}}
47 // FIXME: error message should probably say, "redefinition of 'X0<T, U>::f0'"
48 // rather than just "redefinition of 'f0'"
49 template<typename T
, typename U
>
50 void X0
<T
, U
>::f0(const T
&, const U
&) { // expected-error{{redefinition}}
53 // Test out-of-line constructors, destructors
54 template<typename T
, typename U
>
55 X0
<T
, U
>::X0(int x
) : value(x
) { }
57 template<typename T
, typename U
>
60 // Test out-of-line conversion functions.
61 template<typename T
, typename U
>
62 X0
<T
, U
>::operator T
*() const {
66 namespace N
{ template <class X
> class A
{void a();}; }
67 namespace N
{ template <class X
> void A
<X
>::a() {} }
73 struct B
{ void f(); };
78 void X1
<T
>::template B
<U
>::f() { }
81 template <template <class> class T
>
89 template <template <class> class T
>
91 void X2
<T
>::Bar
<F
>::Func() {}
94 template <template <class> class T
>
99 template <template <class> class T
>