• Home
  • Raw
  • Download

Lines Matching full:template

3 // A declaration of a function template shall be in scope at the point of the 
4 // explicit instantiation of the function template.
5 template<typename T> void f0(T);
6 template void f0(int); // okay
7 template<typename T> void f0(T) { } in f0()
9 // A definition of the class or class template containing a member function
10 // template shall be in scope at the point of the explicit instantiation of
11 // the member function template.
13 template<typename> struct X1; // expected-note 5{{declared here}}
15 template void X0::f0<int>(int); // expected-error {{incomplete type}}
16 template void X1<int>::f0<int>(int); // expected-error {{implicit instantiation of undefined templa…
18 // A definition of a class template or class member template shall be in scope
19 // at the point of the explicit instantiation of the class template or class
20 // member template.
21 template struct X1<float>; // expected-error{{explicit instantiation of undefined template}}
23 template<typename T>
25 template<typename U>
31 template struct X2<int>::Inner<float>; // expected-error{{explicit instantiation of undefined templ…
33 // A definition of a class template shall be in scope at the point of an
35 // class template.
36 template void X1<int>::f1(int); // expected-error {{undefined template}}
37 template void X1<int>::f1<int>(int); // expected-error {{undefined template}}
39 template int X1<int>::member; // expected-error {{undefined template}}
41 // A definition of a member class of a class template shall be in scope at the
43 template struct X2<float>::InnerClass; // expected-error{{undefined member}}
47 template X2<int>::X2(); // expected-error{{not an instantiation}}
48 template X2<int>::X2(const X2&); // expected-error{{not an instantiation}}
49 template X2<int>::~X2(); // expected-error{{not an instantiation}}
50 template X2<int> &X2<int>::operator=(const X2<int>&); // expected-error{{not an instantiation}}
53 // A definition of a class template is sufficient to explicitly
54 // instantiate a member of the class template which itself is not yet defined.
56 template <typename T> struct S {
65 template void S<int>::f();
66 template void S<int>::g();
67 template int S<int>::i;
68 template void S<int>::S2::h();
70 template <typename T> void S<T>::f() {} in f()
71 template <typename T> void S<T>::g() {} in g()
72 template <typename T> int S<T>::i;
73 template <typename T> void S<T>::S2::h() {} in h()
77template <typename STRING_TYPE> class BasicStringPiece; // expected-note {{template is declared h…
79 …extern template class BasicStringPiece<int>; // expected-error{{explicit instantiation of undefin…
80 template class BasicStringPiece<int>;