| 1 |
// { dg-do compile { target c++14 } } |
| 2 |
|
| 3 |
struct X |
| 4 |
{ |
| 5 |
template <class T> static int x; |
| 6 |
}; |
| 7 |
|
| 8 |
int X::x = 42; // { dg-error "template" } |
| 9 |
|
| 10 |
struct Y |
| 11 |
{ |
| 12 |
static int y; |
| 13 |
}; |
| 14 |
|
| 15 |
template <class T> int Y::y = 42; // { dg-error "template" } |