Lines Matching full:template
20 // -- function template
22 template<typename T> void f0(T) { in f0()
29 template<> void f0(NonDefaultConstructible) { } in f0()
35 template<> void f0(int);
36 template<> void f0(long);
39 template<> void N0::f0(int) { } // okay in f0()
42 template<> void N0::f0(long) { } // expected-error{{does not enclose namespace}} in f0()
45 template<> void N0::f0(double);
47 // expected-warning@-2 {{first declaration of function template specialization of 'f0' outside name…
50 template<> void N0::f0(double) { } in f0()
53 template<typename T> void f(T);
55 template<> void f(int); // expected-error{{in class scope}}
58 // -- class template
61 template<typename T>
83 template<typename U>
90 template<typename U>
99 template<typename T>
100 template<typename U>
105 template<typename T> T N0::X0<T>::member;
107 template<> struct N0::X0<void> { };
109 // expected-warning@-2 {{first declaration of class template specialization of 'X0' outside namespa…
114 template<> struct N0::X0<const void> { }; // expected-error{{not in a namespace enclosing 'N0'}}
118 template<> struct X0<volatile void>;
121 template<> struct N0::X0<volatile void> {
125 // -- member function of a class template
126 template<> void N0::X0<void*>::f1(void *) { } in f1()
136 …template<> void X0<volatile void>::f1(void *) { } // expected-error{{no function template matches}} in f1()
138 template<> void X0<const volatile void*>::f1(const volatile void*);
145 // -- static data member of a class template
148 template<>
151 template<> long X0<long>::member = 17;
153 template<> float X0<float>::member;
155 template<> double X0<double>::member;
162 template<> int N0::X0<int>::member;
167 template<> float N0::X0<float>::member = 3.14f;
170 template<> double N0::X0<double>::member = 3.14; // expected-error{{does not enclose namespace}}
173 // -- member class of a class template
176 template<>
179 template<>
182 template<>
185 template<>
188 template<>
192 template<>
198 template<>
202 template<>
205 template<>
215 // -- member class template of a class template
217 template<>
218 template<>
221 template<> template<>
224 template<> template<>
227 template<> template<>
231 template<> template<>
234 template<> template<>
237 // expected-warning@-2 {{first declaration of class template specialization of 'InnerTemplate' outs…
241 template<> template<>
250 // -- member function template of a class template
252 template<>
253 template<>
256 template<> template<>
259 template<> template<>
262 template<> template<>
266 template<> template<>
269 template<> template<>
272 // expected-warning@-2 {{first declaration of function template specialization of 'ft1' outside nam…
276 template<> template<>
289 template<typename Z>
291 template <class T, class U> class Inner;
293 template<typename T, typename U> void f(Inner<T, U>&);
296 …template<> void f(MyInner&); // expected-error{{cannot specialize a function 'f' within class scop…