Lines Matching full:template

11 template<typename T> 
12 T pi = T(3.1415926535897932385); // expected-note {{template is declared here}}
14 template<typename T>
15 CONST T cpi = T(3.1415926535897932385); // expected-note {{template is declared here}}
17 template<typename T> extern CONST T vc;
32 // template arguments are not deduced for uses of variable templates. in no_deduce()
33 …int ipi = pi; // expected-error {{cannot refer to variable template 'pi' without a template argume… in no_deduce()
34 …int icpi = cpi; // expected-error {{cannot refer to variable template 'cpi' without a template arg… in no_deduce()
37 template<typename T>
42 template<typename T>
71 template<typename T> T v; // expected-error {{redefinition of 'v' as different kind of symbol}}
74 template<typename T> T v; // expected-note {{previous definition is here}}
78 template<typename T> T v0; // expected-note {{previous definition is here}}
79 template<typename T> T v0; // expected-error {{redefinition of 'v0'}}
81 template<typename T> T v; // expected-note {{previous definition is here}}
82 template<typename T> int v; // expected-error {{redefinition of 'v'}}
84 template<typename T> extern int v1; // expected-note {{previous template declaration is here}}
85template<int I> int v1; // expected-error {{template parameter has a different kind in templa…
88 template<typename T> T v;
93template<typename T, typename> T v; // expected-note 2{{previous template declaration is here}}
94template<typename T> T v; // expected-error {{too few template parameters in template redeclarat…
95template<typename T, typename, typename> T v; // expected-error {{too many template parameters in
99 template<typename T> T v = T();
100 template<typename T> extern T v; // redeclaration is allowed \
102template<typename T> extern int v; // expected-error {{redeclaration of 'v' with a different ty…
105template<typename T> extern auto v; // expected-error {{declaration of variable 'v' with type 'a…
108 template<typename T> T var = T(); // expected-note {{previous definition is here}}
114template<typename T> auto v0; // expected-error {{declaration of variable 'v0' with type 'auto' re…
115 template<typename T> auto v1 = T(); // expected-note {{previous definition is here}}
116template<typename T> int v1; // expected-error {{redefinition of 'v1' with a different type: 'in…
117 template<typename T> auto v2 = T(); // expected-note {{previous definition is here}}
118 template<typename T> T v2; // expected-error {{redefinition of 'v2'}}
119 template<typename T> auto v3 = T(); // expected-note {{previous definition is here}}
120template<typename T> extern T v3; // expected-error {{redeclaration of 'v3' with a different t…
121 template<typename T> auto v4 = T();
122template<typename T> extern auto v4; // expected-error {{declaration of variable 'v4' with type …
129 template<typename T>
130 T pi0a = T(3.1415926535897932385); // expected-note {{variable template 'pi0a' declared here}}
131template float pi0a<int>; // expected-error {{type 'float' of explicit instantiation of 'pi0a' doe…
133 template<typename T>
134 T pi0b = T(3.1415926535897932385); // expected-note {{variable template 'pi0b' declared here}}
135template CONST int pi0b<int>; // expected-error {{type 'const int' of explicit instantiation of 'p…
137 template<typename T>
138 T pi0c = T(3.1415926535897932385); // expected-note {{variable template 'pi0c' declared here}}
139template int pi0c<const int>; // expected-error {{type 'int' of explicit instantiation of 'pi0c' …
141 template<typename T>
143 template int pi0<int>; // expected-note {{previous explicit instantiation is here}}
144 template int pi0<int>; // expected-error {{duplicate explicit instantiation of 'pi0<int>'}}
146 template<typename T>
147 …CONST T pi1a = T(3.1415926535897932385); // expected-note {{variable template 'pi1a' declared her…
148template int pi1a<int>; // expected-error {{type 'int' of explicit instantiation of 'pi1a' does no…
150 template<typename T>
151 …CONST T pi1b = T(3.1415926535897932385); // expected-note {{variable template 'pi1b' declared her…
152template int pi1b<const int>; // expected-error {{type 'int' of explicit instantiation of 'pi1b' …
154 template<typename T>
156 template CONST int pi1<int>; // expected-note {{previous explicit instantiation is here}}
157template CONST int pi1<int>; // expected-error {{duplicate explicit instantiation of 'pi1<int>'}}
161 template<typename T> auto var0 = T();
162template auto var0<int>; // expected-error {{'auto' variable template instantiation is not allo…
164 template<typename T> auto var = T();
165 template int var<int>;
169 template<typename=int> int missing_args; // expected-note {{here}}
170 template int missing_args; // expected-error {{must specify a template argument list}}
180 template<typename T1, typename T2>
183 template<typename T>
186 template<typename T>
189 template<> CONST int pi2<int,int> = 4;
205 template<typename T1, typename T2>
208 template<typename T>
211 template<typename T>
221 template<typename T>
224 template<> float pi0<int> = 10;
225 template<> int pi0<const int> = 10;
227 template<typename T>
229 template<> CONST int pi1<int> = 10;
231 template<typename T>
233 template<> int pi2<const int> = 10;
235 template<typename T>
237 template<> int pi4<int> = 10;
241 template<typename T>
244 template<> int pi0<int> = 10; // expected-note 3{{previous definition is here}}
248 template<> int pi0<int> = 10; // expected-error {{redefinition of 'pi0<int>'}}
249template<> CONST int pi0<int> = 10; // expected-error {{redefinition of 'pi0' with a different typ…
250template<> float pi0<int> = 10; // expected-error {{redefinition of 'pi0' with a different type: '…
252 template<> auto pi0<int> = 10; // expected-error {{redefinition of 'pi0<int>'}}
256 template<typename T>
259 template<> CONST int pi1<int> = 10; // expected-note {{previous definition is here}}
260 template<> CONST int pi1<int> = 10; // expected-error {{redefinition of 'pi1<int>'}}
264 template<typename T>
265 T pi0 = T(3.1415926535897932385); // expected-note {{variable template 'pi0' declared here}}
267 template<> int pi0<int> = 10;
268 template int pi0<int>;
269template float pi0<int>; // expected-error {{type 'float' of explicit instantiation of 'pi0' do…
271 template<typename T1, typename T2>
274 template<typename T> CONST int pi2<T,int> = 2;
275 template CONST int pi2<int,int>;
278 template<typename T>
281 template int pi0<int>; // expected-note 2{{explicit instantiation first required here}}
282template<> int pi0<int> = 10; // expected-error {{explicit specialization of 'pi0' after instantia…
283template<> float pi0<int>; // expected-error {{explicit specialization of 'pi0' after instantia…
285 template<typename T1, typename T2>
288 template CONST int pi2<int,int>;
289 template<typename T> CONST int pi2<T,int> = 2;
294 template<typename T, typename> auto var0 = T();
295 template<typename T> auto var0<T,int> = T();
296 template<> auto var0<int,int> = 7;
298 template<typename T, typename> auto var = T();
299 template<typename T> T var<T,int> = T(5);
300 template<> int var<int,int> = 7;
315 template<typename T> T* var = new T();
317 template<typename T> auto var<T*> = T(); // expected-note {{previous definition is here}}
318template<typename T> T var<T*> = T(); // expected-error {{redefinition of 'var' with a differe…
324template<typename T> T v = {1234}; // expected-warning {{implicit conversion from 'int' to 'char'…
329 …int k = v<char>; // expected-note {{in instantiation of variable template specialization 'n…
342 template<typename T>
346 template<> float* arr<float> = &f;
363 template<typename T>
370 template float pi0a<float>;
373 template<> double pi0a<double> = 5.2;
377 template<typename T>
383 template float n0b::pi0b<float>;
386 template<> double n0b::pi0b<double> = 5.2;
390 template<typename T>
396 template<typename T>
407 template float pi1a<float>;
413template<> double pi1a<double> = 5.2; // expected-error {{variable template specialization of 'pi…
420 template float n1::pi1b<float>;
426template<> double n1::pi1b<double> = 5.2; // expected-error {{cannot define or redeclare 'pi1b' h…
427 …// expected-error {{variable template specialization of 'pi1b' must originally be declared in name…
433 template<typename T> int a; // expected-note {{variable template 'a' declared here}}
434 …a<int>::b c; // expected-error {{qualified name refers into a specialization of variable template
436 …{identifier followed by '<' indicates a class template specialization but 'a' refers to a variable…
441 template<typename T> int a;
442 int a<int>; // expected-error {{requires 'template<>'}}
447 template<typename T> const auto x = 1;
453 template <typename T> int* f();
454 template <typename T> void f();
455template<> int f<double>; // expected-error {{no variable template matches specialization; did you…
457 template <typename T> void g();
458template<> int g<double>; // expected-error {{no variable template matches specialization; did you…
462 template <typename... Args> struct Variadic_t { };
463 template <typename... Args> Variadic_t<Args...> Variadic;