Title
Empty unions
Status
open
Section
11.5 [class.union]
Submitter
Steve Adamczyk

Created on 1998-10-13.00:00:00 last changed 293 months ago

Messages

Date: 2000-10-15.00:00:00

Notes from 10/00 meeting: The resolution to issue 178, which was accepted as a DR, addresses the first point above (default initialization). The other questions have not yet been decided, however.

Date: 2022-11-20.07:54:16

There doesn't seem to be a prohibition in 11.5 [class.union] against a declaration like

    union { int : 0; } x;
Should that be valid? If so, 9.4 [dcl.init] paragraph 5 third bullet, which deals with default-initialization of unions, should say that no initialization is done if there are no data members.

What about:

    union { } x;
    static union { };
If the first example is well-formed, should either or both of these cases be well-formed as well?

(See also the resolution for issue 151.)

Notes from 10/00 meeting: The resolution to issue 178, which was accepted as a DR, addresses the first point above (default initialization). The other questions have not yet been decided, however.

History
Date User Action Args
2000-11-18 00:00:00adminsetmessages: + msg428
1998-10-13 00:00:00admincreate