1. OMG Mailing List
  2. IDL4 to C++ Language Mapping 1.1 Revision Task Force

Open Issues

  • Issues not resolved
  • Name: idl4-cpp-rtf
  • Issues Count: 31

Issues Summary

Key Issue Reported Fixed Disposition Status
IDL4CPP11-33 Signature op2 in example C++ code not correct IDL4-CPP 1.0b2 open
IDL4CPP11-32 TypeCode class wrong IDL4-CPP 1.0b2 open
IDL4CPP11-31 Tthe traits template should be specialized on the type IDL4-CPP 1.0b2 open
IDL4CPP11-30 Add required default constructor IDL4-CPP 1.0b2 open
IDL4CPP11-29 bitfields not initialized IDL4-CPP 1.0b2 open
IDL4CPP11-28 Missing base_type IDL traits for base struct and bitset IDL4-CPP 1.0b2 open
IDL4CPP11-24 cpp_mapping? IDL4-CPP 1.0b2 open
IDL4CPP11-27 Use IDL::traits IDL4-CPP 1.0b2 open
IDL4CPP11-26 Change enum mapping IDL4-CPP 1.0b2 open
IDL4CPP11-25 Example not matching text IDL4-CPP 1.0b2 open
IDL4CPP11-22 MyBitMaskBits should be _flags IDL4-CPP 1.0b2 open
IDL4CPP11-21 Text has issue IDL4-CPP 1.0b2 open
IDL4CPP11-20 Problems in code example IDL4-CPP 1.0b2 open
IDL4CPP11-19 Typo biset IDL4-CPP 1.0b2 open
IDL4CPP11-18 Using types which use @default/@default_literal IDL4-CPP 1.0b2 open
IDL4CPP11-16 Definition of value_type IDL4-CPP 1.0b2 open
IDL4CPP11-15 constexpr constructors missing IDL4-CPP 1.0b1 open
IDL4CPP11-14 Mapping to std::shared_ptr allows to much IDL4-CPP 1.0b1 open
IDL4CPP11-13 Don't require operator ==/!= IDL4-CPP 1.0b1 open
IDL4CPP11-12 CORBA::CustomerMarshal typo IDL4-CPP 1.0b1 open
IDL4CPP11-11 What is the default value of an annotated numeric type whose range does not include the value 0? IDL4-CPP 1.0a1 open
IDL4CPP11-9 CORBA or non CORBA usage results in non compatible exceptions code IDL4-CPP 1.0b1 open
IDL4CPP11-8 std::shared_ptr should be passed by value IDL4-CPP 1.0b1 open
IDL4CPP11-10 Use consistant initialization IDL4-CPP 1.0b1 open
IDL4CPP11-6 range/min/max underspecified IDL4-CPP 1.0b1 open
IDL4CPP11-7 Remove IDL to C++11 spec extensions IDL4-CPP 1.0b1 open
IDL4CPP11-3 Add Example Transformation IDL4-CPP 1.0a1 open
IDL4CPP11-4 Using floating point types to instantiate pre C++20 templates IDL4-CPP 1.0a1 open
IDL4CPP11-2 Add mapping for C++20 modules IDL4-CPP 1.0b1 open
IDL4CPP11-1 Specify how IDL maps compare their keys IDL4-CPP 1.0a1 open
IDL4CPP11-5 Implicit default and constructor IDL4-CPP 1.0b1 open

Issues Descriptions

Signature op2 in example C++ code not correct

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The argument val of the method op2 of interface A is a basic type, so should be passed as int32_t by value in the example code

  • Reported: IDL4-CPP 1.0b2 — Tue, 26 Nov 2024 14:21 GMT
  • Updated: Mon, 2 Dec 2024 18:37 GMT

TypeCode class wrong

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    All methods having a return value should return by value, that is what the IDL4toCPP language mapping specifies, not as reference

  • Reported: IDL4-CPP 1.0b2 — Tue, 26 Nov 2024 13:31 GMT
  • Updated: Mon, 2 Dec 2024 18:37 GMT

Tthe traits template should be specialized on the type

  • Status: open   Implementation work Blocked
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    Tthe traits template should be specialized on the <Bitmask> type, not on the <Bitmask>Bits type

  • Reported: IDL4-CPP 1.0b2 — Tue, 26 Nov 2024 13:25 GMT
  • Updated: Mon, 2 Dec 2024 18:37 GMT

Add required default constructor

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The spec should also mandate that a default constructor is there which initialized all members to its default, so `MyStruct()` as constructor should be there

  • Reported: IDL4-CPP 1.0b2 — Tue, 26 Nov 2024 12:49 GMT
  • Updated: Mon, 2 Dec 2024 18:36 GMT

bitfields not initialized

  • Status: open   Implementation work Blocked
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The mapping doesn't show or mention any initialization of the bitfields, which means that they get a random value at runtime, the spec should describe and show that the bitfields are all zero initalized

  • Reported: IDL4-CPP 1.0b2 — Tue, 26 Nov 2024 12:46 GMT
  • Updated: Mon, 2 Dec 2024 18:36 GMT

Missing base_type IDL traits for base struct and bitset

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    As struct/bitset support inheritance, at the moment there is a base a IDL::traits<>::base_type should be avilable for template meta programming

  • Reported: IDL4-CPP 1.0b2 — Fri, 22 Nov 2024 12:39 GMT
  • Updated: Mon, 2 Dec 2024 18:33 GMT

cpp_mapping?

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The text talks about struct_mapping, but shouldn't the text refer to cpp_mapping and say that the default is STRUCT_WITH_PUBLIC_MEMBERS, the internal struct_mapping with the default is just an internal thing (maybe rename struct_mapping to just value), when I look at IDL4.2, it has in 8.3.1.2 the autoid annotation, there AutoidKind is just not mentioned and the user uses @autoid, and not @AutoidKind

  • Reported: IDL4-CPP 1.0b2 — Thu, 24 Oct 2024 11:08 GMT
  • Updated: Thu, 31 Oct 2024 10:31 GMT

Use IDL::traits

  • Status: open   Implementation work Blocked
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    IDL to C++11 defines a set of IDL::traits, but this spec uses the old CORBA::traits, section A has to be updated/cleaned to use IDL::traits

  • Reported: IDL4-CPP 1.0b2 — Mon, 28 Oct 2024 13:52 GMT
  • Updated: Mon, 28 Oct 2024 14:57 GMT

Change enum mapping

  • Status: open   Implementation work Blocked
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The proposed enum mapping makes it harder to migrate from C+03 to C11 or newer, why not map this to a class with a _flags enum as member (same as bitmask does). The _flags enum contains the enum elements as defined in IDL, this way user code can use AnEnum::zero independent whether C03 or C+11 is used

  • Reported: IDL4-CPP 1.0b2 — Mon, 28 Oct 2024 13:48 GMT
  • Updated: Mon, 28 Oct 2024 14:57 GMT

Example not matching text

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The example has the following operations for a_long (same issue happens with the others)

    void a_long(int32_t value)

    {...}
    int32_t& a_long() {...}

    int32_t a_long() const

    {...}

    a_long is a basic type, so according to the text it should have:

    <MemberType> <MemberName>()
    <MemberType> <MemberName>() const;

    Both return by value, but the example has one returning by reference.

    Also the setter for a_struct doesn't match the text, seems this chapter needs some review and tweaks

  • Reported: IDL4-CPP 1.0b2 — Mon, 28 Oct 2024 13:21 GMT
  • Updated: Mon, 28 Oct 2024 14:57 GMT

MyBitMaskBits should be _flags

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The text says that the code should use a _flags enum, but the example usees MyBitMaskBits

  • Reported: IDL4-CPP 1.0b2 — Tue, 8 Oct 2024 13:41 GMT
  • Updated: Fri, 11 Oct 2024 14:38 GMT

Text has issue

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The text says

    An implementation of the !=, &=, and ^= bitwise operators

    But that should use operator |= and not !=

  • Reported: IDL4-CPP 1.0b2 — Tue, 8 Oct 2024 13:39 GMT
  • Updated: Fri, 11 Oct 2024 14:38 GMT

Problems in code example

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The struct MyBitMask as example code has the following buts:

    • After `flag1 = 0x01 <<` the 1 is missing
    • operator|= has an incorrect first implementation line, should be `_value |= other;`
    • operator&= has a wrong argument , should be `std::uint32_t other`
    • operator uint32_t() can be const
  • Reported: IDL4-CPP 1.0b2 — Tue, 8 Oct 2024 13:38 GMT
  • Updated: Fri, 11 Oct 2024 14:37 GMT

Typo biset

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    This section has:

    IDL biset types shall be mapped as defined in Clause 7.14.3.2 of this specification.

    Notice the typo, biset should be bitset

  • Reported: IDL4-CPP 1.0b2 — Tue, 8 Oct 2024 13:22 GMT
  • Updated: Fri, 11 Oct 2024 14:37 GMT

Using types which use @default/@default_literal

  • Status: open   Implementation work Blocked
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The spec is not clear when a type annotated with @default/@default_literal will really use these annotations

    For example when I have in IDL the following:

    @default(5) typedef long mylong;

    When I now use in C++

    mylong myvalue {};

    What would be the value of myvalue, would it be 5 (the default I specified), or will it be 0?

    Also when I have in IDL

    enum Color

    { GREEN, @default_literal RED, BLUE }

    ;

    And in C++ I have

    Color mycolor {};

    What is the value of mycolor, RED or GREEN?

    RTI support says these annotations are only used when the IDL type is used within a complex type (struct/union/exception), but if that is the case the IDL spec should mention this.

    Some other related questions/thinking points

    • What when using array/sequences/map of these types?
    • what about @range?
  • Reported: IDL4-CPP 1.0b2 — Fri, 4 Oct 2024 11:48 GMT
  • Updated: Fri, 11 Oct 2024 14:36 GMT

Definition of value_type

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The definition of value_type says `Defines type - Type to be used as return C++ type.`, but in what context is return handled. For example in the struct class mapping for type T a const and non-const accesor is defined. Shouldn't be value_type defined as `The template parameter T.`, just as A.1.1 does?

  • Reported: IDL4-CPP 1.0b2 — Thu, 26 Sep 2024 11:25 GMT
  • Updated: Fri, 27 Sep 2024 14:03 GMT

constexpr constructors missing

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    In user code I want to use constexpr for IDL fixed values, for example

    constexr F pi

    {3.142857}

    ;

    But in order for that to work a constexpr constructor has to be available, the spec should define that

  • Reported: IDL4-CPP 1.0b1 — Wed, 4 Sep 2024 07:19 GMT
  • Updated: Wed, 4 Sep 2024 14:18 GMT

Mapping to std::shared_ptr allows to much

  • Status: open   Implementation work Blocked
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    In the context of CORBA it is not legal to just compare object references with operator==/!= which are both provided by std:;shared_ptr. The fact that the local client proxy is different doesn't mean the called CORBA servant is different, in IDL to C+11 comparing two interfaces is illegal (see 6.7.2 of IDL to C+11). This specification should make it clear that omg::types::ref_type<T> should not be comparable

  • Reported: IDL4-CPP 1.0b1 — Wed, 21 Aug 2024 07:15 GMT
  • Updated: Wed, 4 Sep 2024 14:14 GMT

Don't require operator ==/!=

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The spec says for structured types "A set of comparison operators, including at least "equal to" and "not equal to."", but that is not possible when the structure contains interfaces, valuetypes, valueboxes, abstract, all special types don't provide a operator==/!= so they can't be required when a structure contains any of these. This requirement has to be removed. CORBA doesn't provide equal for these special types because a local != doesn't mean that the references are not pointing to the same servant, object identity is not done through local pointers

  • Reported: IDL4-CPP 1.0b1 — Mon, 19 Aug 2024 07:14 GMT
  • Updated: Wed, 4 Sep 2024 14:10 GMT

CORBA::CustomerMarshal typo

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    CORBA::CustomerMarshal should be CORBA::CustomMarshal

  • Reported: IDL4-CPP 1.0b1 — Mon, 19 Aug 2024 07:09 GMT
  • Updated: Wed, 4 Sep 2024 14:09 GMT

What is the default value of an annotated numeric type whose range does not include the value 0?

  • Status: open  
  • Source: Objective Interface Systems ( Mr. Chuck Abbott)
  • Summary:

    If the numeric type is annotated by range:

        @range(min=1, max = 10) long f1;
    

    or min

        @min(1) long f1;
    

    or max

        @max(-1) long f1;
    

    but does not specify a default, what is the default value since it cannot be 0.

  • Reported: IDL4-CPP 1.0a1 — Wed, 12 Jun 2024 15:54 GMT
  • Updated: Fri, 21 Jun 2024 17:37 GMT

CORBA or non CORBA usage results in non compatible exceptions code

  • Status: open   Implementation work Blocked
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    The spec describes that with CORBA an invalid usage of union can result in a CORBA::BAD_PARAM exception, for bounded string/vector also a CORBA::BAD_PARAM, but when not using CORBA when IDL4CSP11-9 is resolved a different exception is thrown for an union (for vector it seems this still has to be added also). When a user now has appliation code that uses IDL defined data types with and without CORBA their exception code is different. In order to achieve portability of user code I think the spec should define a omg::bad_param alias type which maps to CORBA::BAD_PARAM or the selected std exception. That way user code can be written portable when the user has data types defined by IDL and wants to support use cases with and without CORBA

  • Reported: IDL4-CPP 1.0b1 — Sun, 3 Mar 2024 07:23 GMT
  • Updated: Fri, 21 Jun 2024 17:37 GMT


Use consistant initialization

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    the code examples use = and {} to initialize the constants, recommend to make this consistent by always using {}

  • Reported: IDL4-CPP 1.0b1 — Fri, 12 Apr 2024 09:55 GMT
  • Updated: Fri, 21 Jun 2024 17:37 GMT

range/min/max underspecified

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    A few remarks on 7.17.3:

    • formatting of code in text is not done
    • what is the impact of range when applied to a typedef of a basic type on all argument passing rules when that typedef is passed with a function, stored in an union or exception?
    • how should min/max be implemented, shouldn't also omg::types::ranged be used?
    • what should be done when min/max but also range are used as annotation?
  • Reported: IDL4-CPP 1.0b1 — Wed, 24 Jan 2024 08:58 GMT
  • Updated: Fri, 21 Jun 2024 17:37 GMT

Remove IDL to C++11 spec extensions

  • Status: open  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    I find it not very maintainable to extend in this spec silently the IDL to C++11 language mapping. In the v1.7 revision I think all is already mapped, so I propose to remove D.3 completely from this spec

  • Reported: IDL4-CPP 1.0b1 — Thu, 25 Jan 2024 12:53 GMT
  • Updated: Fri, 21 Jun 2024 17:37 GMT

Add Example Transformation

  • Status: open  
  • Source: Dassault Systemes ( Mr. Daniel Brookshier)
  • Summary:

    Not sure where (not necessarily in the noted paragraph) should include a reference to an electronic mapping file as an example. Could also include test sample IDL and corresponding C++ output. This should probably be informational and could also be in an Annex. The key reason is to show the actual transformation as well as a test/verification of the mappings. Perhaps also include versions of tools/compiler used in which the transformations were validated. In addition unit tests could be referenced or included as informative content to the spec.

  • Reported: IDL4-CPP 1.0a1 — Thu, 28 Sep 2023 20:50 GMT
  • Updated: Fri, 21 Jun 2024 17:37 GMT

Using floating point types to instantiate pre C++20 templates

  • Status: open  
  • Source: Objective Interface Systems ( Mr. Chuck Abbott)
  • Summary:

    Prior to C++20, the following template cannot be instantiated:

    template <typename T, const T thingy>
    class MyTemplate {};

    MyTemplate<double, 5.0> x;

  • Reported: IDL4-CPP 1.0a1 — Wed, 10 Jan 2024 19:33 GMT
  • Updated: Fri, 21 Jun 2024 17:37 GMT


Specify how IDL maps compare their keys

  • Status: open  
  • Source: Object Computing, Inc. - OCI ( Mr. Adam Mitz)
  • Summary:

    Keys of maps can be any IDL type. How should the generated C++ code support key comparison of any type?

  • Reported: IDL4-CPP 1.0a1 — Tue, 21 Mar 2023 17:53 GMT
  • Updated: Fri, 21 Jun 2024 17:37 GMT

Implicit default and constructor

  • 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