Reference (section label): [class.union.anon]
Issue description:
Currently [class.union.anon]p2 says:
Each member-declaration in the member-specification of an anonymous union shall either define one or more public non-static data members or be a static_assert-declaration.
This prohibits empty declarations in anonymous unions, i.e.
struct A { union {int x;;} u; }; //ok
struct B { union {int y;;}; }; //error
I do not see any motivation for this discrepancy.
Suggested resolution:
Modify the quoted sentence:
Each member-declaration in the member-specification of an anonymous union shall either define one or more public non-static data members, be an empty-declaration or be a static_assert-declaration .
Reference (section label): [class.union.anon]
Issue description:
Currently [class.union.anon]p2 says:
This prohibits empty declarations in anonymous unions, i.e.
I do not see any motivation for this discrepancy.
Suggested resolution:
Modify the quoted sentence: