Lines Matching defs:CONST
5 #define CONST const
12 template<typename T> CONST T wrong; // expected-error {{non-static data member 'wrong' cannot be declared as a template}}
13 template<typename T> CONST T wrong_init = 5; // expected-error {{non-static data member 'wrong_init' cannot be declared as a template}}
14 template<typename T, typename T0> static CONST T right = T(100);
15 template<typename T> static CONST T right<T,int> = 5;
16 template<typename T> CONST int right<int,T>; // expected-error {{non-static data member 'right' cannot be declared as a template}}
17 template<typename T> CONST float right<float,T> = 5; // expected-error {{non-static data member 'right' cannot be declared as a template}}
24 template<> CONST int right<int,int> = 7;
25 template<> CONST float right<float,int>;
26 template static CONST int right<int,int>; // expected-error {{expected '<' after 'template'}}
31 template<typename T, typename T0> static CONST T right = T(100);
32 template<typename T> static CONST T right<T,int> = T(5);
34 template<> CONST int B0::right<int,int> = 7; // expected-note {{previous}}
35 template CONST int B0::right<int,int>; // expected-warning {{has no effect}}
36 template<> CONST int B0::right<int,float>; // expected-note {{previous}}
37 template CONST int B0::right<int,float>; // expected-warning {{has no effect}}
40 template<typename T, typename T0> static CONST T right;
41 template<typename T> static CONST T right<T,int>;
43 template<typename T, typename T0> CONST T B1::right = T(100);
44 template<typename T> CONST T B1::right<T,int> = T(5);
47 template<typename T, typename T0> static CONST T right = T(100); // expected-note {{previous initialization is here}}
48 template<typename T> static CONST T right<T,int> = T(5); // expected-note {{previous initialization is here}}
50 template<typename T, typename T0> CONST T B2::right = T(100); // expected-error {{static data member 'right' already has an initializer}}
51 template<typename T> CONST T B2::right<T,int> = T(5); // expected-error {{static data member 'right' already has an initializer}}
54 template<typename T, typename T0> static CONST T right = T(100);
55 template<typename T> static CONST T right<T,int> = T(5);
57 template<typename T, typename T0> CONST T B3::right;
58 template<typename T> CONST T B3::right<T,int>;
61 template<typename T, typename T0> static CONST T a;
62 template<typename T> static CONST T a<T,int> = T(100);
63 template<typename T, typename T0> static CONST T b = T(100);
64 template<typename T> static CONST T b<T,int>;
66 template<typename T, typename T0> CONST T B4::a; // expected-error {{default initialization of an object of const type 'const int'}}
67 template<typename T> CONST T B4::a<T,int>;
68 template CONST int B4::a<int,char>; // expected-note {{in instantiation of}}
69 template CONST int B4::a<int,int>;
71 template<typename T, typename T0> CONST T B4::b;
72 template<typename T> CONST T B4::b<T,int>; // expected-error {{default initialization of an object of const type 'const int'}}
73 template CONST int B4::b<int,char>;
74 template CONST int B4::b<int,int>; // expected-note {{in instantiation of}}
110 template<typename T> static CONST T right_inst = T(10); // expected-note {{here}}
111 template<typename T> static CONST T right_inst<T*> = T(100); // expected-note {{here}}
113 template CONST int C::right_inst<int>; // expected-error {{undefined variable template}}
114 template CONST int C::right_inst<int*>; // expected-error {{undefined variable template}}
120 template<typename U> static CONST U Data<U*> = U(); // expected-note {{here}}
123 template<typename U> static CONST U Data2<U*> = U();
141 template<typename U> static CONST U* Data<U*>; // Okay, with out-of-line definition
143 template<typename T> CONST T* C1b::Data<T*> = (T*)(0);
144 template CONST int* C1b::Data<int*>;
184 template<typename U> static CONST U Data<U*> = U();
186 template CONST int D0<float>::Data<int*>;
212 template<typename U> static CONST U Data = U(100); // expected-note {{here}}
221 template<typename U> static CONST U Data<U*> = U(10); // expected-note {{previous declaration is here}}
235 template<typename U> static CONST U Data<U*> = U(10); // expected-note {{previous declaration is here}}