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 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 object. Each member-declaration in the member-specification of an anonymous union shall
either define a non-static data member or be a static_assert-declaration. [Note: Nested types, anonymous
unions, and functions cannot be declared within an anonymous union. — end note] The names of the
members of an anonymous union shall be distinct from the names of any other entity in the scope in which
the anonymous union is declared. ...
Note also that the last statement in the next paragraph is a mere duplication of a similar statement in the Note above.
Anonymous unions declared in a named namespace or in the global namespace shall be declared static.
Anonymous unions declared at block scope shall be declared with any storage class allowed for a block-scope
variable, or with no storage class. A storage class is not allowed in a declaration of an anonymous union in a
class scope. An anonymous union shall not have private or protected members (11.9). An anonymous union
shall not have member functions.
The text was updated successfully, but these errors were encountered:
[class.union.anon]/1:
Note also that the last statement in the next paragraph is a mere duplication of a similar statement in the Note above.
[class.union.anon]/2:
The text was updated successfully, but these errors were encountered: