-
Key: IDL4CPP-32
-
Status: closed
-
Source: Remedy IT ( Johnny Willemsen)
-
Summary:
Spec says:
If the union has a default case, the default constructor shall initialize the discriminator, and the selected
member field following the initialization rules described in Clause 7.2.4.3.1. If it does not, the default
constructor shall initialize the union to the first discriminant value specified in the IDL definition.But when there is an implicit default member, that should be selected, for example, the example below (
enum DataType { dtEmpty, dtLong, dtShort, dtString, dtPoint, dtTrack, dtGlobal }; union Data switch (DataType) { case dtLong: long longData; case dtShort: short shortData; case dtString: string stringData; case dtPoint: string pointData; case dtTrack: string trackData; case dtGlobal: string globalData; // by default (implicit), empty union };
-
Reported: IDL4-CPP 1.0b1 — Tue, 16 Jan 2024 09:36 GMT
-
Disposition: Deferred — IDL4-CPP 1.0b2
-
Disposition Summary:
Defer the resolution of this issue to the resolution of the related IDL RTF issue
This issue is deferred until the resolution IDL43-94.
-
Updated: Mon, 16 Sep 2024 14:15 GMT
IDL4CPP — Implicit default and constructor
- Key: IDL4CPP-32
- OMG Task Force: IDL4 to C++ Language Mapping (IDL4-CPP) 1.0 FTF