-
Key: IDL4CPP11-5
-
Status: open
-
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
-
Updated: Fri, 21 Jun 2024 17:37 GMT
IDL4CPP11 — Implicit default and constructor
- Key: IDL4CPP11-5
- OMG Task Force: IDL4 to C++ Language Mapping (IDL4-CPP) 1.1 RTF