File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 33053305\end {ncsimplebnf }
33063306is called an \defn {anonymous union}; it defines an unnamed type and
33073307an unnamed object of that type called an \defn {anonymous union object}.
3308+ \indextext {access control!anonymous \tcode {union}}%
3309+ \indextext {restriction!anonymous \tcode {union}}%
33083310Each \grammarterm {member-declaration} in the \grammarterm {member-specification}
3309- of an anonymous union shall either define a non-static data member or be a
3310- \grammarterm {static_assert-declaration}.
3311+ of an anonymous union shall either define a public non-static data member or
3312+ be a \grammarterm {static_assert-declaration}.
33113313Nested types, anonymous unions, and functions
33123314shall not be declared within an anonymous union.
33133315The names of the members of an anonymous union shall be distinct from
33363338block scope shall be declared with any storage class allowed for a
33373339block-scope variable, or with no storage class. A storage class is not
33383340allowed in a declaration of an anonymous union in a class scope.
3339- \indextext {access control!anonymous \tcode {union}}%
3340- \indextext {restriction!anonymous \tcode {union}}%
3341- An anonymous union shall not have private or protected
3342- members\iref {class.access }. An anonymous union shall not have
3343- member functions.
33443341
33453342\pnum
33463343\begin {note }
You can’t perform that action at this time.
0 commit comments