Lines Matching full:template
19 // -- function template
21 template<typename T> void f0(T) { in f0()
25 template<> void f0(NonDefaultConstructible) { } in f0()
31 template<> void f0(int);
32 template<> void f0(long);
35 template<> void N0::f0(int) { } // okay in f0()
38 template<> void N0::f0(long) { } // expected-error{{does not enclose namespace}} in f0()
41 template<> void N0::f0(double) { } in f0()
44 template<typename T> void f(T);
46 template<> void f(int); // expected-error{{in class scope}}
49 // -- class template
52 template<typename T>
62 template<typename U>
66 template<typename U>
72 template<typename T>
73 template<typename U>
78 template<typename T> T N0::X0<T>::member;
80 template<> struct N0::X0<void> { };
84 …template<> struct N0::X0<const void> { }; // expected-error{{class template specialization of 'X0'…
88 template<> struct X0<volatile void>;
91 template<> struct N0::X0<volatile void> {
95 // -- variable template [C++1y]
97 template<typename T> int v0; // expected-note +{{here}}
98 template<> extern int v0<char[1]>;
99 template<> extern int v0<char[2]>;
100 template<> extern int v0<char[5]>;
101 template<> extern int v0<char[6]>;
105 template<typename T> int v1; // expected-note +{{here}}
106 template<> extern int v1<char[3]>;
107 template<> extern int v1<char[4]>;
108 template<> extern int v1<char[7]>;
109 template<> extern int v1<char[8]>;
111 template<> int N0::v0<int[1]>;
112 template<> int v0<int[2]>; // FIXME: ill-formed
113 template<> int ::v1<int[3]>; // expected-warning {{extra qualification}}
114 template<> int v1<int[4]>;
116 template<> int N0::v0<char[1]>;
117 template<> int v0<char[2]>; // FIXME: ill-formed
118 template<> int ::v1<char[3]>; // expected-warning {{extra qualification}}
119 template<> int v1<char[4]>;
122 template<> int N0::v0<int[5]>; // expected-error {{must originally be declared in namespace 'N0'}} …
123 template<> int v0<int[6]>; // expected-error {{must originally be declared in namespace 'N0'}}
124 template<> int ::v1<int[7]>; // expected-error {{must originally be declared in the global scope}} …
125 template<> int v1<int[8]>; // expected-error {{must originally be declared in the global scope}}
127 template<> int N0::v0<char[5]>; // expected-error {{does not enclose namespace 'N0'}}
128 template<> int v0<char[6]>; // FIXME: ill-formed
129 template<> int ::v1<char[7]>; // expected-error {{cannot name the global scope}}
130 template<> int v1<char[8]>; // FIXME: ill-formed
133 // -- member function of a class template
134 template<> void N0::X0<void*>::f1(void *) { } in f1()
141 …template<> void X0<volatile void>::f1(void *) { } // expected-error{{no function template matches}} in f1()
143 template<> void X0<const volatile void*>::f1(const volatile void*);
150 // -- static data member of a class template
153 template<>
156 template<> long X0<long>::member = 17;
158 template<> float X0<float>::member;
160 template<> double X0<double>::member;
167 template<> int N0::X0<int>::member;
169 template<> float N0::X0<float>::member = 3.14f;
172 template<> double N0::X0<double>::member = 3.14; // expected-error{{does not enclose namespace}}
175 // -- member class of a class template
178 template<>
181 template<>
184 template<>
187 template<>
190 template<>
194 template<>
197 template<>
201 template<>
204 template<>
214 // -- member class template of a class template
216 template<>
217 template<>
220 template<> template<>
223 template<> template<>
226 template<> template<>
230 template<> template<>
233 template<> template<>
237 template<> template<>
246 // -- member function template of a class template
248 template<>
249 template<>
252 template<> template<>
255 template<> template<>
258 template<> template<>
262 template<> template<>
265 template<> template<>
269 template<> template<>
283 template<class T> void f(T&);
285 template<class T>
291 template<typename U>
294 template<typename U>
306 // template, or, if the namespace is inline (7.3.1), any namespace
308 template<> void f(X1&);
309 template<> void f<X2>(X2&);
311 template<> struct X0<X1> { };
313 template<> struct X0<X2>::MemberClass { };
315 template<> void X0<X2>::mem_func();
317 template<> template<typename T> struct X0<X2>::MemberClassTemplate { };
319 template<> template<typename T> void X0<X2>::mem_func_template(T&) { } in mem_func_template()
321 template<> int X0<X2>::value = 12;
327 template<> void has_inline_namespaces::f(X3&);
328 template<> void has_inline_namespaces::f<X4>(X4&);
330 template<> struct has_inline_namespaces::X0<X3> { };
332 template<> struct has_inline_namespaces::X0<X4>::MemberClass { };
334 template<> void has_inline_namespaces::X0<X4>::mem_func();
336 template<> template<typename T>
339 template<> template<typename T>
342 template<> int has_inline_namespaces::X0<X4>::value = 13;
345 template<typename> [[noreturn]] void func();
346 template<> void func<int>();