blob: 4180e0983eaafe7df1e751b3e6fa1b212c22d1a1 [file] [log] [blame]
// PR c++/82593
// { dg-do compile { target c++11 } }
// { dg-options "" }
int INDEX1 = 0;
int INDEX2 = 1;
class SomeClass {
public:
SomeClass();
private:
struct { int field; } member[2];
};
SomeClass::SomeClass()
: member{
[INDEX1] = { .field = 0 }, // { dg-error "constant expression" }
[INDEX2] = { .field = 1 } // { dg-error "constant expression" }
}
{
}