Title
Anonymous unions in unnamed namespaces
Status
nad
Section
9.2.2 [dcl.stc]
Submitter
Greg Comeau

Created on 1999-08-09.00:00:00 last changed 302 months ago

Messages

Date: 1999-10-15.00:00:00

Rationale (10/99): An anonymous union in an unnamed namespace is not "a global anonymous union," i.e., it is not a member of the global namespace.

Date: 2022-02-18.07:47:23

11.5 [class.union] paragraph 3 implies that anonymous unions in unnamed namespaces need not be declared static (it only places that restriction on anonymous unions "declared in a named namespace or in the global namespace").

However, 9.2.2 [dcl.stc] paragraph 1 says that "global anonymous unions... shall be declared static." This could be read as prohibiting anonymous unions in unnamed namespaces, which are the preferred alternative to the deprecated use of static.

Rationale (10/99): An anonymous union in an unnamed namespace is not "a global anonymous union," i.e., it is not a member of the global namespace.

History
Date User Action Args
2000-02-23 00:00:00adminsetmessages: + msg280
2000-02-23 00:00:00adminsetstatus: open -> nad
1999-08-09 00:00:00admincreate