|
9 | 9 | #endif |
10 | 10 |
|
11 | 11 | class A { |
12 | | - template<typename T> CONST T wrong; // expected-error {{member 'wrong' declared as a template}} |
13 | | - template<typename T> CONST T wrong_init = 5; // expected-error {{member 'wrong_init' declared as a template}} |
| 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 | 14 | template<typename T, typename T0> static CONST T right = T(100); |
15 | 15 | template<typename T> static CONST T right<T,int> = 5; |
16 | | - template<typename T> CONST int right<int,T>; // expected-error {{member 'right' declared as a template}} |
17 | | - template<typename T> CONST float right<float,T> = 5; // expected-error {{member 'right' declared as a template}} |
| 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}} |
18 | 18 | #ifdef PRECXX11 |
19 | 19 | // expected-warning@-2 {{in-class initializer for static data member of type 'const float' is a GNU extension}} |
20 | 20 | #else |
@@ -161,14 +161,14 @@ namespace non_const_init { |
161 | 161 | #ifndef PRECXX11 |
162 | 162 | namespace constexpred { |
163 | 163 | class A { |
164 | | - template<typename T> constexpr T wrong; // expected-error {{member 'wrong' declared as a template}} |
| 164 | + template<typename T> constexpr T wrong; // expected-error {{non-static data member 'wrong' cannot be declared as a template}} |
165 | 165 | // expected-error@-1 {{declaration of constexpr static data member 'wrong' requires an initializer}} |
166 | | - template<typename T> constexpr T wrong_init = 5; // expected-error {{member 'wrong_init' declared as a template}} |
| 166 | + template<typename T> constexpr T wrong_init = 5; // expected-error {{non-static data member 'wrong_init' cannot be declared as a template}} |
167 | 167 | template<typename T, typename T0> static constexpr T right = T(100); |
168 | 168 | template<typename T> static constexpr T right<T,int> = 5; |
169 | | - template<typename T> constexpr int right<int,T>; // expected-error {{member 'right' declared as a template}} |
| 169 | + template<typename T> constexpr int right<int,T>; // expected-error {{non-static data member 'right' cannot be declared as a template}} |
170 | 170 | // expected-error@-1 {{declaration of constexpr static data member 'right<int, T>' requires an initializer}} |
171 | | - template<typename T> constexpr float right<float,T> = 5; // expected-error {{member 'right' declared as a template}} |
| 171 | + template<typename T> constexpr float right<float,T> = 5; // expected-error {{non-static data member 'right' cannot be declared as a template}} |
172 | 172 | template<> constexpr int right<int,int> = 7; |
173 | 173 | template<> constexpr float right<float, int>; // expected-error {{declaration of constexpr static data member 'right<float, int>' requires an initializer}} |
174 | 174 | template static constexpr int right<int,int>; // expected-error {{expected '<' after 'template'}} |
|
0 commit comments