Is it possible to have an anonymous union with const members? I have the following:
struct Bar {
union {
struct { const int x, y; };
const int xy[2];
};
Bar() : x(1), y(2) {}
};
With G++ 4.5 I get the error:
error: uninitialized member ‘Bar::<anonymous union>::xy’ with ‘const’ type ‘const int [2]’