You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A data member is a non-function member introduced by a member-declarator.
While [class.union.anon] p1 says
A union of the form union { member-specification } ; is called an anonymous union; it defines an unnamed type and an unnamed object of that type called an anonymous union member if it is a non-static data member or an anonymous union variable otherwise.
Such two rules contradict each other. Maybe, we should say
An anonymous union behaves as if it were replaced by
union { member-specification } unnamed;
The text was updated successfully, but these errors were encountered:
xmh0511
changed the title
Anonymous union member is not a non-static data member on grammar
An anonymous union member is not a non-static data member on grammar
Sep 26, 2021
The fall-out for that approach is a bit wide in scope. I think just extending the sentence in [class.mem.general] p3 for the anonymous union case is good enough.
[class.mem.general] p3 explicitly says
While [class.union.anon] p1 says
Such two rules contradict each other. Maybe, we should say
The text was updated successfully, but these errors were encountered: