Lines Matching refs:Data
45 template<typename T, typename T0> CONST T B2::right = T(100); // expected-error {{static data member 'right' already has an initializer}}
46 template<typename T> CONST T B2::right<T,int> = T(5); // expected-error {{static data member 'right' already has an initializer}}
75 template<typename T> static T wrong_inst_defined = T(10); // expected-error {{non-const static data member must be initialized out of line}}
83 template int A::wrong_inst_defined<int>; // expected-note {{in instantiation of static data member 'non_const_init::A::wrong_inst_defined<int>' requested here}}
90 template<typename T> static T wrong_inst<T*> = T(100); // expected-error {{non-const static data member must be initialized out of line}} expected-note {{refers here}}
99 template int B::wrong_inst<int*>; // expected-note {{in instantiation of static data member 'non_const_init::B::wrong_inst<int *>' requested here}}
114 template<typename U> static U Data;
115 template<typename U> static CONST U Data<U*> = U(); // expected-note {{here}}
120 const int c0_test = C0::Data<int*>;
122 template const int C0::Data<int*>; // expected-error {{undefined}}
128 template<typename U> static U Data;
129 template<typename U> static U* Data<U*>; // Okay, with out-of-line definition
131 template<typename T> T* C1a::Data<T*> = new T();
132 template int* C1a::Data<int*>;
135 template<typename U> static U Data;
136 template<typename U> static CONST U* Data<U*>; // Okay, with out-of-line definition
138 template<typename T> CONST T* C1b::Data<T*> = (T*)(0);
139 template CONST int* C1b::Data<int*>;
142 template<typename U> static int Data;
143 template<typename U> static U* Data<U*> = new U(); // expected-error {{non-const static data member must be initialized out of line}}
145 template int* C2a::Data<int*>; // expected-note {{in instantiation of static data member 'non_const_init::pointers::C2a::Data<int *>' requested here}}
148 template<typename U> static int Data;
149 template<typename U> static U *const Data<U*> = (U*)(0); // expected-error {{static data member of type 'int *const'}}
151 template<typename U> U *const C2b::Data<U*>;
152 template int *const C2b::Data<int*>; // expected-note {{in instantiation of static data member 'non_const_init::pointers::C2b::Data<int *>' requested here}}
160 // expected-error {{non-static data member cannot be constexpr; did you intend to make it const?}}
161 template<typename T> constexpr T wrong_init = 5; // expected-error {{non-static data member cannot be constexpr; did you intend to make it static?}}
165 // expected-error {{non-static data member cannot be constexpr; did you intend to make it const?}}
166 template<typename T> constexpr float right<float,T> = 5; // expected-error {{non-static data member cannot be constexpr; did you intend to make it static?}}
179 template<typename U> static U Data; // expected-note {{here}}
180 template<typename U> static CONST U Data<U*> = U();
182 template CONST int D0<float>::Data<int*>;
183 template int D0<float>::Data<int>; // expected-error {{undefined}}
184 template<typename T> template<typename U> const U D0<T>::Data<U*>;
188 template<typename U> static U Data;
189 template<typename U> static U* Data<U*>;
192 template<typename U> U* D1<T>::Data<U*> = (U*)(0);
193 template int* D1<float>::Data<int*>; // expected-note {{previous}}
194 template int* D1<float>::Data<int*>; // expected-error {{duplicate explicit instantiation}}
198 template<typename U> static U Data;
199 template<typename U> static U* Data<U*>;
202 template<typename U> U* D2<float>::Data<U*> = (U*)(0) + 1;
203 template int* D2<float>::Data<int*>; // expected-note {{previous}}
204 template int* D2<float>::Data<int*>; // expected-error {{duplicate explicit instantiation}}
208 template<typename U> static CONST U Data = U(100); // expected-note {{here}}
210 static_assert(D3<float>::Data<int> == 100, "");
211 template const char D3<float>::Data<char>; // expected-error {{undefined}}
216 template<typename U> static U Data;
217 template<typename U> static CONST U Data<U*> = U(10); // expected-note {{previous declaration is here}}
220 template<typename U> U D0a<float>::Data<U*> = U(100); // expected-error {{redefinition of 'Data'}}
230 template<typename U> static U Data;
231 template<typename U> static CONST U Data<U*> = U(10); // expected-note {{previous declaration is here}}
234 template<typename U> U D1<float>::Data = U(10);
236 template<typename U> U D1<float>::Data<U*> = U(100); // expected-error{{redefinition of 'Data'}}