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 3305
3305
\end {ncsimplebnf }
3306
3306
is called an \defn {anonymous union}; it defines an unnamed type and
3307
3307
an unnamed object of that type called an \defn {anonymous union object}.
3308
+ \indextext {access control!anonymous \tcode {union}}%
3309
+ \indextext {restriction!anonymous \tcode {union}}%
3308
3310
Each \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}.
3311
3313
Nested types, anonymous unions, and functions
3312
3314
shall not be declared within an anonymous union.
3313
3315
The names of the members of an anonymous union shall be distinct from
3336
3338
block scope shall be declared with any storage class allowed for a
3337
3339
block-scope variable, or with no storage class. A storage class is not
3338
3340
allowed 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.
3344
3341
3345
3342
\pnum
3346
3343
\begin {note }
You can’t perform that action at this time.
0 commit comments