Issues for Mailing list of the IDL to C++11 V1.1 (IDL2CPP11) Revision Task Force

To comment on any of these issues, send email to idl2cpp11-rtf@omg.org. (Please include the issue number in the Subject: header, thusly: [Issue ###].) To submit a new issue, send email to issues@omg.org.

List of issues (green=resolved, yellow=pending Board vote, red=unresolved)

List options: All ; Open Issues only; or Closed Issues only

Issue 17420: In-place construction of structure types
Issue 18149: RFP requirement on DDS-PSM-Cxx compatibility is violated
Issue 18385: typo exists in section 6.21
Issue 18386: Lack of factory reference type
Issue 18387: Add support for _this on local objects
Issue 18388: Add missing implicit widening to any
Issue 18389: Font issue
Issue 18390: Extend IDL type traits for template meta programming
Issue 18392: Remove _narrow methods
Issue 18404: Invalid struct initialization example
Issue 18405: Fixed type mapping should provide (explicit) operator bool
Issue 18406: Meaning of (u)intN_t types unclear
Issue 18418: Missing specification of assignment operators of valuetypes
Issue 18433: std::ostream insertion underspecified
Issue 18453: Early detection of bound violation on bounded types
Issue 18463: CORBA::Exception should not use std::string type for name and repo_id
Issue 18498: Minor typos
Issue 18500: Use () instead of (void)
Issue 18523: Introduce trait for local interface base type
Issue 18527: Replace all _downcase/downcase with narrow
Issue 18533: IDL2C++11 issue : CORBA dependency of the C++11 mapping
Issue 18536: Small typos in servant reference section
Issue 18578: Remove final for structured types
Issue 18655: Relax constructor argument rules
Issue 18656: Add namespace level swap
Issue 18660: Remove user defined literal support
Issue 18761: Errors on code snippes related to skeleton classes
Issue 18762: Code fragment should use skel class
Issue 18832: Question on unions default member

Issue 17420: In-place construction of structure types (idl2cpp11-rtf)

Click here for this issue's archive.
Source: Real-Time Innovations (Dr. Sumant Tambe, sumant(at)rti.com)
Nature: Enhancement
Severity: Significant
Summary:
There are two main motivations:


(1) Performance: IDL types may be large and not all IDL types may have C++11 mapping with efficient move constructors. For example, an IDL structure containing an array does not have an efficient move-ctor. Current mapping for an IDL struct type (section 6.13.1) requires  an explicit constructor accepting values for each member by value in the order they are specified in IDL. Although this method is sufficient in most cases, it is not optimal. Particularly, the types that don't support efficient move-ctor. 


(2) Usability: Often C++11 standard library containers could be constructed using several alternatives. For instance, a string member in a struct may be constructed using any of its 9 constructors or a vector may be constructed using any of its 7 constructors. Currently, the IDL2C++11 specification allows construction of members of a structure using only two kinds of constructors: copy-ctor and move-ctor. (due to the pass-by-value rule mentioned above)


Resolution: The IDL2C++11 mapping of structures could be enhanced to construct large objects in-place. Provide a way to construct the member objects of a struct in-place using a perfect-forwarding constructor. The intent is to support all the ways of constructing all the member objects from the constructor of the parent object. Moreover, a perfect-forwarding constructor may eliminate the need for a move, which may lead to some performance improvements.


The solution relies on an idiom known as piecewise_construct idiom. It relies on a perfect-forwarding constructor that takes as many tuples as there are members in a struct. Each tuple encapsulates the parameters to construct one member. Tuples are needed because member ctor could take several parameters and the user may be interested in using them. For instance, using an allocator for std::vector. The user of the struct calls std::forward_as_tuple for each member object to group the parameters in a tuple. The special constructor simply forwards the tuples to the respective member. 

The C++ standard library uses this idiom for std::map and std::unordered_map to construct complex objects in-place using the emplace operations. However, more general uses have been identified: http://cpptruths.blogspot.com/2012/06/perfect-forwarding-of-parameter-groups.html

Resolution: The issues proposes an extension to the construction of structured types. A vendor could already add this as performance improvement without being it as part of the specification. Before adding this to the specification this addition first have to be shown in a concrete product to make sure it can be implemented and is usable for users. This hasn’t been done by any vendor yet which made us decide to defer this issue to a future RTF. Revised Text: Disposition: Deferred
Revised Text:
Actions taken:
June 11, 2012: received issue

Discussion:
The issues proposes an extension to the construction of structured types. A vendor could already add this as performance improvement without being it as part of the specification. Before adding this to the specification this addition first have to be shown in a concrete product to make sure it is implementable and usable for users. This hasn’t been done by any vendor yet which made us decide to defer this issue to a future RTF.


Issue 18149: RFP requirement on DDS-PSM-Cxx compatibility is violated (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: PrismTech (Dr. Angelo Corsaro, PhD., angelo.corsaro(at)prismtech.com)
Nature: Revision
Severity: Critical
Summary:
The current mapping for struct violates the RFP requirements that mandated compatibility with the DDS-PSM-Cxx. Areas of incompatibilities include the use of the C++11 array type and the use of move operators.

Resolution: The revised submission explicitly mentioned that this requirement was not met because this is a C++11 language mappping, not focusing on C++03 which is the focus of the DDS-PSM-Cxx. Also in the mean time the DDS-PSM-Cxx has adopted the same mapping for arrays/enums and mentions move semantics when C++11 support is available. Given the fact this is a C++11 language mapping this issue has been closed without a change. Disposition: Closed, no change
Revised Text:
Actions taken:
October 10, 2012: received issue

Issue 18385: typo exists in section 6.21 (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Clarification
Severity: Minor
Summary:
The following typo error exists in section 6.21:


Following text in spec
... TypeCode reference constants, <type> refer to the local name of the type ...
should be
... TypeCode reference constants, <type> refers to the local name of the type ...

Refs #2877

Resolution: The V1.0 spec doesn’t have this typo, so closing this with no change Disposition: Closed
Revised Text:
Actions taken:
January 23, 2013: received issue

Issue 18386: Lack of factory reference type (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Clarification
Severity: Minor
Summary:
The specification defines IDL::traits<A>::factory_type as C++ trait for getting the base C++ class for the factory. It does lack a trait for passing a reference for a certain factory around. 


To be added:
For a valuetype A, a strong reference to its valuetype factory is known as IDL::traits<A>::factory_ref_type. The weak object reference to its valuetype factory is known as IDL::traits<A>::weak_factory_ref_type.

Refs #2727

Resolution: Accepting this addition as proposed
Revised Text: To paragraph 6.18.10.2 add the following new sentence as 3rd line: The strong reference type of the value factory is known as IDL::traits<A>::factory_ref_type and its weak reference type is known as IDL::traits<A>::weak_factory_ref_type. The first paragraph than becomes as full text: All valuetypes that have initializer operations declared for them also have type-specific C++ value factory classes generated for them. For a valuetype A, the factory class can be retrieved using the IDL::traits<A>::factory_type trait. The strong reference type of the value factory is known as IDL::traits<A>::factory_ref_type and its weak reference type is known as IDL::traits<A>::weak_factory_ref_type. Each initializer operation maps to a pure virtual function in the factory class, and each of these initializers defined in IDL is mapped to an initializer function of the same name. Base valuetype initializers are not inherited, and so do not appear in the factory class. The initializer parameters are mapped using normal C++ parameter passing rules for in parameters. The return type of each initializer function is a reference to the created valuetype.
Actions taken:
January 23, 2013: received issue

Issue 18387: Add support for _this on local objects (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Clarification
Severity: Minor
Summary:
With the new IDL2C++11 mapping we can't create object references with new, we have to use the CORBA::make_reference<> factory method. In a servant we can use _this to get a reference to itself, but that is not available for local objects. With the old C++ binding people could just use the C++ this to get a _ptr to a local object, but that is not possible with the C++11 binding in general.


Proposal is to add to 6.24:


In order to get an object reference referring to an already created local object the _this() method must be used. 


In the code part add as method


class LocalIF {
protected:
IDL::traits<LocalIF>::ref_type _this ();
};
Refs #2804

Resolution: Accepting this addition as proposed
Revised Text: Add to section 6.25, first paragraph, before the line “Here is an example of how to implement a local interface:” the following new sentence: Within the context of a request on a local object the _this() method allows the retrieval of the object reference for the target object handling that request. Add a new IDL interface as : local interface LocalIB { void if_op (in LocalIF an_f_arg); }; Update the C++ example by adding the _this to the class LocalIF (which itself was added by issue 18523): class LocalIF { protected: virtual ~LocalIF (); IDL::traits<LocalIF>::ref_type _this (); }; and change the class MyLocalIF to class MyLocalIF : public IDL::traits<LocalIF>::base_type { The complete C++ example than becomes: // C++ class LocalIF { protected: virtual ~LocalIF (); IDL::traits<LocalIF>::ref_type _this (); }; class MyLocalIF : public IDL::traits<LocalIF>::base_type { public: MyLocalIF (); virtual ~MyLocalIF(); void an_op(int32_t an_arg) override IDL::traits<LocalIB>::ref_type b_ref = ...; // obtain a reference to B // invoke if_op with a reference to this local object b_ref->if_op (this->_this ()); }; IDL::traits<LocalIF>::ref_type myref = CORBA::make_reference <MyLocalIF> ();
Actions taken:
January 23, 2013: received issue

Issue 18388: Add missing implicit widening to any (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Clarification
Severity: Minor
Summary:
The description for Any lacks the support for implicit widening as it was available with the C++ mapping. Proposal is to add implicit widening to section 6.16.3. The following text is proposed to be added:


Any object reference, valuetype reference, or abstract references has to extractable as its base reference type from an Any.


Also in the last sentence of 6.13, any as bold should be Any with a capital A

Refs #2873

Resolution: Accepting this addition as proposed with the remark that 6.13 should be 6.17.3 and it talks about the Any C++ class, not the any IDL type.
Revised Text: Change the last paragraph of 6.17.3 from For strings, wide strings, and sequences applications are responsible for checking the TypeCode of the any to be sure that they do not overstep the bounds of the sequence, string, or wide string object when using the extracted value. to For strings, wide strings, and sequences applications are responsible for checking the TypeCode of the Any to be sure that they do not overstep the bounds of the sequence, string, or wide string object when using the extracted value. To the end of section 6.17.3 add a new paragraph with the text: Any object reference should be extractable from an Any as a base object reference. Any abstract reference should be extractable from an Any as a base object reference or as a base valuetype reference. Any valuetype reference should be extractable from an Any as a base valuetype reference
Actions taken:
January 23, 2013: received issue

Issue 18389: Font issue (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Clarification
Severity: Minor
Summary:
In section 6.25.6, in the line:


This guarantees that the POA skeleton class inherits only one version of each operation, and also allows optional
inheritance of implementations. In this example, the implementation of interface B reuses the implementation of interface
A:

The font of A should also be IDL type just as B

Resolution: Accepting this addition as proposed
Revised Text: Changed text This guarantees that the POA skeleton class inherits only one version of each operation, and also allows optional inheritance of implementations. In this example, the implementation of interface B reuses the implementation of interface A: So have the last A character style IDL
Actions taken:
January 23, 2013: received issue

Issue 18390: Extend IDL type traits for template meta programming (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Clarification
Severity: Minor
Summary:
The specification defines IDL::traits<> as type trait, but uses it only for reference types.


We propose to extend IDL::traits<> as generic type trait for IDL2C++11. This type trait delivers traits with information coming from IDL. 


For example object reference traits it can also deliver local and abstract as traits, which are booleans that indicate whether the IDL type was local or abstract.


For sequence we can add traits indicating the type of the element and in case of bounded sequences the bound.


The proposal is to add a new paragraph which describes the IDL type traits that are all available as part of IDL::traits<> for a specific IDL type.

Ref #2802

Resolution: Extending the IDL::traits<> with more types for template meta programming will be useful for the users that would like to program C++11 templates using the IDL defined types. Therefor a new set of type traits will be added to the specification.
Revised Text: see pages 14 - 17 of ptc/2013-05-34 for details
Actions taken:
January 23, 2013: received issue

Issue 18392: Remove _narrow methods (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Clarification
Severity: Minor
Summary:
Given interface T the specification defines IDL::traits<T>::narrow as a way to narrow to T. As convenience it also defined T::_narrow. The issue is that T::_narrow is implicitly linked to IDL::traits<T>::narrow and can cause confusion and possible misuse when other traits are added for more specific traits. We propose to remove T::_narrow from the specification completely, users must just use IDL::traits<T>::narrow

Resolution: Accepting this issue as proposed
Revised Text: see pages 18 - 19 of ptc/2013-05-34 for details
Actions taken:
January 29, 2013: received issue

Issue 18404: Invalid struct initialization example (idl2cpp11-rtf)

Click
here for this issue's archive.
Nature: Clarification
Severity: Minor
Summary:
The example in the middle of the page starts with:


// C++
S s = {10};


but the struct mapping (6.13.1 p.23) clearly says that "an explicit constructor accepting values for struct each member" shall be provided. Above initialization context is a copy-initialization context and would require a non-explicit constructor. The example should be fixed to use a direct-initialization context instead, either:


// C++
S s{10};


or


// C++
S s = S{10};

Resolution: Accepting this issue as proposed
Revised Text: In 6.14.2 change the example S S = {10}; to S s{10};
Actions taken:
February 1, 2013: received issue

Issue 18405: Fixed type mapping should provide (explicit) operator bool (idl2cpp11-rtf)

Click
here for this issue's archive.
Nature: Enhancement
Severity: Minor
Summary:
Given the specification of the class template Fixed provides


operator int64_t () const;
operator long double() const;


and


bool operator!() const;


This allows to test some Fixed instantiation within a boolean context as in a useful way as follows:


typedef IDL::Fixed<5,2> F;
F f = ...;
if (!f) { ... }


But the similar inverse form


if (f) { ... }


will cause an ambiguity error between the two conversion functions to int64_t and long double. User code is required to write the obfuscated form


if (!!f) { ... }


to realize the same thing. This is unfortunate and there is a simple means to solve this problem: The specification should add


explicit operator bool() const;


to the class template synopsis with the same semantics as negating operator!

Resolution: Accepting this issue as proposed. Also during the discussion it was proposed to add a namespace level to_string
Revised Text: In the class declaration of the Fixed template change the operator int64_t and long double to explicit operator int64_t () const; explicit operator long double() const; And change bool operator !() const to June 11, 2013 22 explicit operator bool() const; After the class declaration add the following namespace level to_string template <uint16_t digits, uint16_t scale> std::string to_string (const IDL::Fixed <digits, scale>&); Add the following explanation to the first paragraph after the code example The operator bool will return true when the fixed value is zero, in all other cases it will return false.
Actions taken:
February 1, 2013: received issue

Issue 18406: Meaning of (u)intN_t types unclear (idl2cpp11-rtf)

Click
here for this issue's archive.
Nature: Clarification
Severity: Significant
Summary:
Section 6.5 (Table 6.1) loosely describes that the OMG IDL integer types are mapped to "a basic C++11 type" denoted by 


int16_t int32_t int64_t uint16_t uint32_t uint64_t uint8_t


It doesn't really say, what these typedefs are supposed to be. Furthermore 6.5 (Table 6.2) describes the names


int16_t int32_t int64_t uint16_t uint32_t uint64_t uint8_t


as "keywords from the C++11 specification (ISO/IEC 14882:011)".


Surely there are *no* such keywords in C++11 (nor in C11 or C99) and never had been. What C++11 inherits from the C99 library specification are the typedefs


std::int16_t std::int32_t std::int64_t std::uint16_t std::uint32_t
std::uint64_t std::uint8_t


from header <cstdint>, but those are not keywords and they are library components that belong to namespace std. I *think* that the specification of the basic integer type mapping (6.5) intends to refer to these typedefs from <cstdint>, but this should be made clear in 6.5.

Also, section 6.30 should not declare them as C++11 keywords, even though these names need to be protected by a _cxx_ prefix as described by 6.2. Presumably a better name is needed (e.g. "protected C++11 names" or some such)

Resolution: Accepting this issue as proposed
Revised Text: Change the name of section 6.31 from “Keywords” to “Protected names” Change the first sentence to become: T able 6.14 lists all C++11 protected names including the keywords from C++11 specification (ISO/IEC 14882:2011) dated September 2011 Change last paragraph of 6.3 to June 11, 2013 24 To avoid C++ compilation problems, every use in OMG IDL of a C++ protected name as an identifier is mapped into the same name preceded by the prefix “_cxx_”. For example, an IDL interface named “try” would be named “_cxx_try” when its name is mapped into C++. For consistency, this rule also applies to identifiers that are derived from IDL identifiers. The complete list of C++ protected names can be found in “C++11 Protected names” on page 53. To the bottom of 6.6 add Each OMG IDL basic type is mapped to the listed C++ type as defined by C++11 or by the fixed-size integral types of the header <cstdint>.
Actions taken:
February 1, 2013: received issue

Issue 18418: Missing specification of assignment operators of valuetypes (idl2cpp11-rtf)

Click
here for this issue's archive.
Nature: Clarification
Severity: Significant
Summary:
Section 6.17.2 is titled "Constructors, Assignment Operators, and Destructors" but does not say anything about assignment operators albeit the title promises to do so.


The following examples seems to indicate that both assignment operators are supposed to be deleted. This should be spelled out.

It also seems as if the maiing for interfaces as of 6.6 is intended to create class types with deleted copy/move assignment operators. This should also be made more clear.

Resolution: Accepting this issue as proposed
Revised Text: In section 6.18.2 change the first line to become: A C++ valuetype class defines a protected default constructor, protected copy constructor, protected move constructor, deleted copy assignment operator, deleted move assignment operator, and a protected virtual destructor.
Actions taken:
February 5, 2013: received issue

Issue 18433: std::ostream insertion underspecified (idl2cpp11-rtf)

Click
here for this issue's archive.
Nature: Clarification
Severity: Significant
Summary:
The wording in 6.29 says


"For each IDL type (T) of type: [..] an ostream inserter with the following signature will be provided:


// C++
std::ostream& operator<<(std::ostream &, T);


For all other types an ostream inserter with the following signature will be provided:


// C++
std::ostream& operator<<(std::ostream &, const T&);"


1) This wording is not clear in which namespace the operator<< overload shall be provided. It could be within the global namespace or within the namespace of type T. 


The prototype implementation that I have seen provides these operators in the global namespace which makes them behave irregular: 


The reason is that overloaded operators such as these IO inserters are found by argument-dependent name-lookup. The lookup will consider all declarations that are found at the point of usage and will look in the associated namespaces of the operands to find them. Consider the following example:


#include <iostream>
#include <vector>
#include <iterator>


namespace n {
  struct A {};
}
std::ostream& operator<<(std::ostream& os, n::A) { return os; }


int main() {
  std::vector<n::A> v;
  std::copy(v.begin(), v.end(), std::ostream_iterator<n::A>(std::cout));
}


This program will not compile, because the involved template cannot "see" the operator<< overload. TRhis is so, because it is provided in the global namespace, but the operands are in namespace std:: and namespace n, resp. Adding overloads to namespace std is not valid, therefore the only option is to add the operator<< overload to namespace n:


#include <iostream>
#include <vector>
#include <iterator>


namespace n {
 struct A {};
 std::ostream& operator<<(std::ostream& os, n::A) { return os; }
}


int main() {
  std::vector<n::A> v;
  std::copy(v.begin(), v.end(), std::ostream_iterator<n::A>(std::cout));
}


This works and lets the ostream operator<< of A::n behave normally.


This example was intended to demonstrate that the provided operator<< overloads should be provided in the same namespace as the declared mapped types from the IDL (that is within the IDL module). The wording in 6.29 should be clarified in that regard.


2) The second part of above wording, 


"For all other types an ostream inserter with the following signature will be provided:


// C++
std::ostream& operator<<(std::ostream &, const T&);"


can be read to be applicable for the arithmetic IDL types (bool, short, wchar_t, char, double, uint32_t, ...) or typedefs thereof, but that surely cannot be intended, because that would result in a compiler ambiguity when user code would include such a mapping header and would attempt to print such an arithmetic type on any std::ostream, e.g.


#include <iostream>
#include "some_idl.h"


int main() {
  std::cout << 12; // Error, ambiguity
}

The wording in 6.29 should make clear that *no* operator<< overloads shall be provided for the basic data types or for typedefs thereof.

Resolution: We had a detailed looked at the argument dependent lookup and what would technically be feasible. We also had users that wanted to define their own ostream operators and our spec defined methods were conflicting with that approach. Given that this feature was mostly focused on debugging systems, we decided to remove this section completely from the specification
Revised Text: Remove section 6.30 with the title std::ostream insertion completely from the spec
Actions taken:
February 6, 2013: received issue

Issue 18453: Early detection of bound violation on bounded types (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: EADS (Mr. Oliver M. Kellogg, oliver.kellogg(at)cassidian.com)
Nature: Enhancement
Severity:
Summary:
Addressee: IDL to C++11 1.1 RTF <idl2cpp11-rtf@omg.org>
Nature: Enhancement
Summary: Early detection of bound violation on bounded types


In the IDL to C++11 Mapping v1.0 (formal/13-02-04), the sections
6.9, 6.10, and 6.11 describe the mapping for string, wstring, and
sequence types, respectively. These sections also address the bounded
variant of those types:


" Implementations must (at run time) detect attempts to pass a
[string|wstring|sequence] value that exceeds the bound as a parameter
across an interface. It must raise a BAD_PARAM system exception to
signal the error. "


In practice, the point at which such a value is passed into an interface
method may be far away from the assignment causing a bound violation,
which makes the error source hard to find.


I propose doing a bound check not only at interface methods but also
at the setter functions for struct, union, and valuetype members.


The section quoted above could thus be extended as follows:


" Implementations must (at run time) detect attempts to pass a 
[string|wstring|sequence] value that exceeds the bound as a parameter 
across an interface, or passed to a setter method of a struct, union,
or valuetype. It must raise a BAD_PARAM system exception to 
signal the error. "


Furthermore, the mapping standard does not define the bound check
behavior for arrays and sequences of bounded types.
IMHO the mapping standard should make explicit that the bound check
shall be performed on each bounded-type element of an array or sequence.


Example:


  // IDL
  typedef string<12> string12_t;
  typedef string12_t string_arr_t[2][3];
  typedef sequence<string12_t, 4> string_seq_t;
  struct struct_t {
    string_arr_t sarr;
    string_seq_t sseq;
  }


The sarr() and sseq() setter methods generated for struct_t should
iterate over their input parameter and perform the bound check on
each element. Similar checks should happen in the explicit constructor
which accepts values for each struct member.


Resolution: Adding the bounds check to the place where the bounded type is used leads to inconsistent behavior for users. After discussion we decided to map bounded types (string/wstring/sequence) to a distinct type and that this type could do a bounds check. The exact type doesn’t need to be standardized because bound types can only be used through a typedef in IDL and never are used directly by the programmer. Because the standard containers don’t have the concept of bounds enforcing a bound will be very hard to accomplish on all places.
Revised Text: Change section 6.10 to The OMG IDL unbounded string type is mapped to std::string. A bounded string type is mapped to a distinct type to differentiate from an unbounded string. This distinct type must deliver std::string semantics and support transparent conversion from bounded to unbounded and vice versa including support for move semantics. Implementations of the bounded string are under no obligation to perform a bounds check on the type itself. As a result, the programmer is responsible for enforcing the bound of bounded strings at run time. Implementations of the mapping are under no obligation to prevent assignment of a string value to a bounded string type if the string value exceeds the bound. Implementations must (at run time) detect attempts to pass a string value that exceeds the bound as a parameter across an interface. It must raise a BAD_PARAM system exception to signal the error. Change 6.11 to The OMG IDL unbounded wide string type is mapped to std::wstring. A bounded wide string type is mapped to a distinct type to differentiate from an unbounded wide string. This distinct type must deliver std::wstring semantics and support transparent conversion from bounded to unbounded and vice versa including support for move semantics. Implementations of the bounded wide string are under no obligation to perform a bounds check on the type itself. As a result, the programmer is responsible for enforcing the bound of bounded wstrings at run time. Implementations of the mapping are under no obligation to prevent assignment of a string value to a bounded wstring type if the wstring value exceeds the bound. Implementations must (at run time) detect attempts to pass a wstring value that exceeds the bound as a parameter across an interface. It must raise a BAD_PARAM system exception to signal the error. And the first paragraph of 6.12 to An unbounded sequence is mapped to a C++ std::vector. A bounded sequence is mapped to a distinct type to differentiate from an unbounded sequence. This distinct type must deliver std::vector semantics and support transparent conversion from bounded to unbounded and vice versa including support for move semantics. As a result, the programmer is responsible for enforcing the bound of bounded sequences at run time. Implementations of the mapping are under no obligation to prevent assignment of a sequence to a bounded sequence type if the sequence exceeds the bound. Implementations must at run time detect attempts to pass a sequence that exceeds the bound as a parameter across an interface. When an implementation detects this error, it must raise a BAD_PARAM system exception to signal the error. Change the example of paragraph 6.12 to // IDL typedef sequence<T> V1; // unbounded sequence typedef sequence<T, 2> V2; // bounded sequence typedef sequence<V1> V3; // sequence of sequences // C++ typedef std::vector <T> V1; typedef IDL::bounded_vector <T, 2> V2; typedef std::vector <V1> V3;
Actions taken:
February 13, 2013: received issue

Issue 18463: CORBA::Exception should not use std::string type for name and repo_id (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Enhancement
Severity: Minor
Summary:
CORBA::Exception should not use std::string type for name and repo_id for 2 reasons:


1. C++ standard conformance; member types like std::string are discouraged because their constructors may throw exceptions where std::exception and derivatives are expected not to throw exceptions themselves
2. (minor) performance; using std::string these member values are unnecessarily copied while they immutable constant strings only ever read, never mutated


Changing the members to const char* values makes CORBA::Exception and the CORBA::SystemException classes optimal and c++ standard conformant.


This will not be the case for CORBA::UserException derivatives as these may have IDL defined attributes having IDL defined types which may definitely throw exceptions. However the ORB should be expected to handle situations where creating user exceptions unexpectedly throws another exception.

Refs #2958

Resolution: Update exception as proposed. During the discussion also it was proposed to define what() as noexcept which also has been done
Revised Text: Update exception as proposed. During the discussion also it was proposed to define what() as noexcept which also has been done Revised text: Change in 6.20 in the exception class the methods _name, _rep_id and what to virtual const char* _name() const; virtual const char* _rep_id() const; virtual const char* what() const noexcept override; Also in 6.20 after the sentence: The _name() function returns the unqualified (unscoped) name of the exception. The _rep_id() function returns the repository ID of the exception. Add the following text to describe the return type of the _name and _rep_id functions. Both return a pointer to a c-string with content related to the exception. This is guaranteed to be valid at least until the exception object from which it is obtained is destroyed or until a non-const member function of the exception object is called.
Actions taken:
February 18, 2013: received issue

Issue 18498: Minor typos (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Clarification
Severity: Minor
Summary:
2.1 refers to ISO/IEC 14822:2011 (which should be 14882:2011)


6.30 instead refers to ISO/IEC 14882:011 (again should be 14882:2011)


the table in 6.30 contains typos (alinas, alineof, constrexpr), names
that aren't keywords (int32_t, ...) and misses some keywords
(noexcept, char16_t, char32_t).

Resolution: Accepting this issue as proposed
Revised Text: see pages 33/34 of ptc/2013-05-34 for details
Actions taken:
February 24, 2013: received issue

Issue 18500: Use () instead of (void) (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Clarification
Severity: Minor
Summary:
The specification uses in some examples like in 6.13.1 the construct "(void)" for a method with no arguments. This is old style, it should use "()"

Resolution: Accepting this issue as proposed
Revised Text: In 6.14 change the accessors from void A (T); T A (void) const; T& A (void); to void A (T); T A () const; T& A (); And from void A (const T&); void A (T&&); const T& A (void) const; T& A (void); to void A (const T&); void A (T&&); const T& A () const; T& A (); And in 6.14.1 change the class Variable to // C++ class Variable { public: Variable (); ~Variable (); Variable (const Variable&); Variable (Variable&&); Variable& operator= (const Variable& x); Variable& operator= (Variable&& x); explicit Variable (std::string name); void name (const std::string& _name); void name (std::string&& _name); const std::string& name () const; std::string& name (); }; And in 6.18.4 change the val2 methods of class OBV_Example to virtual void val2 (int32_t); virtual int32_t val2 () const; virtual int32_t& val2 (); In 6.20 change the constructor for Exception from Exception(void); to Exception();
Actions taken:
February 25, 2013: received issue

Issue 18523: Introduce trait for local interface base type (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Revision
Severity: Minor
Summary:
The specification uses IDL::traits<T> for everything related to interface T, but for a local interface we just use T as base class. Proposal is to use IDL::traits<T>::base_type as base type trait for the local object implementation. This makes everything related to interfaces available through IDL::traits<T>

Resolution: Accepting this issue as proposed
Revised Text: In section 6.25 change the first paragraph from The C++ mapping of LocalObject is a class derived from Object that is used as a base class for locality constrained object implementations. The class mapping the interface should be (indirectly) derived from LocalObject and have the same name as the interface. to The C++ mapping of LocalObject is a class derived from Object that is used as a base class for locality constrained object implementations. The class mapping the interface should be (indirectly) derived from LocalObject and must be available as IDL::traits<>::base_type. Also change the class declaration MyLocalIF from class MyLocalIF : public LocalIF { to class MyLocalIF : public IDL::traits<LocalIF>::base_type {
Actions taken:
March 4, 2013: received issue

Issue 18527: Replace all _downcase/downcase with narrow (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Clarification
Severity: Minor
Summary:
As done for the interfaces already, we propose to remove _downcase/_narrow for abstract/valuetype and only support IDL::traits<>::narrow. In the spec this has to be updated in text and code.

Resolution: Accepting this issue as proposed
Revised Text: In 6.18.3 change the last section from As part of the valuetype traits IDL::traits<>::downcast is provided. This method is also provided as a static _downcast function by each valuetype class. These methods provides a portable way for applications to cast down the C++ inheritance hierarchy. If a nil reference is passed to one of these operations, it returns a nil reference. Otherwise, if the valuetype instance referenced to by the argument is an instance of the valuetype class being downcast to, a reference to the downcast-to class type is returned. If the valuetype instance pointed to by the argument is not an instance of the valuetype class being downcast to, a nil reference is returned. to As part of the valuetype traits IDL::traits<>::narrow is provided. This method provides a portable way for applications to cast down the C++ inheritance hierarchy. If a nil reference is passed to one of these operations, it returns a nil reference. Otherwise, if the valuetype instance referenced to by the argument is an instance of the valuetype class being narrowed to, a reference to the narrowed-to class type is returned. If the valuetype instance pointed to by the argument is not an instance of the valuetype class being narrowed to, a nil reference is returned. In section 6.18.10.1 change To allow the implementation to create value instances required during unmarshaling, the ValueFactoryBase class provides the create_for_unmarshal pure virtual function. The function is private so that only the implementation, through implementation-specific means (e.g., via a friend class), can invoke it. Applications are not expected to invoke the create_for_unmarshal function. Derived classes shall override the create_for_unmarshal function and shall implement it such that it creates a new value instance and returns a reference to it. Since the create_for_unmarshal function returns a reference to ValueBase, the caller may use the downcasting functions supplied by value types to downcast the reference back to a reference to a derived value type. to To allow the implementation to create value instances required during unmarshaling, the ValueFactoryBase class provides the create_for_unmarshal pure virtual function. The function is private so that only the implementation, through implementation-specific means (e.g., via a friend class), can invoke it. Applications are not expected to invoke the create_for_unmarshal function. Derived classes shall override the create_for_unmarshal function and shall implement it such that it creates a new value instance and returns a reference to it. Since the create_for_unmarshal function returns a reference to ValueBase, the caller may use the narrow function supplied by the value type IDL trait to narrow the reference back to a reference to a derived value type. In 6.18.3 change the last paragraph to As part of the valuetype traits IDL::traits<>::narrow is provided. This method provides a portable way for applications to cast down the C++ inheritance hierarchy. If a nil reference is passed to one of these operations, it returns a nil reference. Otherwise, if the valuetype instance referenced to by the argument is an instance of the valuetype class being narrowed to, a reference to the narrowed-to class type is returned. If the valuetype instance pointed to by the argument is not an instance of the valuetype class being narrowed to, a nil reference is returned. In 6.18.4 remove the _downcast method from the class Example In 6.18.5 remove the _downcast method from the class ValueBase In 6.18.7.2 remove the first bullet saying “A public static _downcast function” In 6.18.7.2 remove the _downcast method from the ColorValue class
Actions taken:
March 5, 2013: received issue

Issue 18533: IDL2C++11 issue : CORBA dependency of the C++11 mapping (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: PrismTech (Nawel Hamouche, nawel.hamouche(at)prismtech.com)
Nature: Uncategorized Issue
Severity:
Summary:
A big effort have been done to remove CORBA dependency from the IDL2C++11 mapping, but it still specifies a CORBA semantic to the IDL 
interfaces and user exceptions. In 6.6.4, it is said "Conceptually, the Object class in the CORBA module is the base interface type for all objects;" this assertion breaks all that efforts. I think the semantic of IDL interfaces should be abstracted by defining a middleware-independent Object type as the super type of all IDL interfaces, it could be IDL::Object. Likewise, CORBA::UserException and CORBA::SystemException could be abstracted by defining IDL::UserExeption and IDL::SystemException.
Looking to the IDL3.5 specification, it is true that this specification is still tied to CORBA, but special care has been done to separate between the syntactical construct and its semantic. For instance, it is said 'See the CORBA 3.2 specfication Section 10.2 “Semantics of Abstract Interfaces” for CORBA implementation semantics associated with abstract interfaces.'. It means that there could be other semantics than CORBA.
I would suggest the following changes in the IDL2CPP11 specification :
- To introduce IDL::Object, IDL::LocalObject, IDL::UserExeption and IDL::SystemException.
- To not consider an IDL interface as a CORBA Object and rephrase section 6.6.4 accordingly.
- To not consider a user exception as a CORBA exeption and rephrase section 6.19 accordingly.
- To group all CORBA-dependent mappings and APIs in one section "CORBA mapping". This section would include :
    6.16 Mapping for the Any Type
    6.17 Mapping for Valuetypes
    6.18.1 Abstract Interface Base
    6.21 TypeCode
    6.22 ORB
    6.23 Object
    6.24 LocalObject
    ... until 6.28

Resolution: The IDLC++11 langauge mapping explicitly refers to CORBA v3.2 because there is no clean IDL spec yet. There should first be a clean IDL4 spec that is completely middleware agnostic and which gives generic guidelines for language mappings how to target specific middleware technologies like CORBA. At the moment there is an IDL4 spec with those guidelines we can update the IDL2C++11 spec accordingly June 11, 2013 41 Disposition: Deferred
Revised Text:
Actions taken:
March 7, 2013: received issue

Issue 18536: Small typos in servant reference section (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Clarification
Severity: Minor
Summary:
Two small typos in sectin 6.25.3:
aks CORBA::weak_servant_reference<> 
to 
aka CORBA::weak_servant_reference<> 


Than 
Foo some_function()
to
Foo::some_function()

Resolution: Change text as proposed
Revised Text: Chage aks CORBA::weak_servant_reference<> to aka CORBA::weak_servant_reference<> And change Foo some_function() to Foo::some_function()
Actions taken:
March 8, 2013: received issue

Issue 18578: Remove final for structured types (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Clarification
Severity: Minor
Summary:
The mapping defines the mapping of IDL struct/union to a final class. The work "final" should be removed from the IDL to C++11 language mapping because it will prevent the implementation of the DDSXTypes Type Extensibility.

Resolution: Accepting this issue as proposed
Revised Text: In 6.3 remove “final” from class E In 6.14 change the first line from The mapping for structured types is a final C++ class with a default constructor, a copy constructor, a move constructor, an assignment copy operator, an assignment move operator, and a destructor. to The mapping for structured types is a C++ class with a default constructor, a copy constructor, a move constructor, an assignment copy operator, an assignment move operator, and a destructor. In 6.14.1 change the first line of An OMG IDL struct maps to a final C++ class, with each OMG IDL struct member mapped to a set of corresponding member methods. to An OMG IDL struct maps to a C++ class, with each OMG IDL struct member mapped to a set of corresponding member methods. In 6.14.1 remove final from class Variable In 6.14.2 change the first line from A union maps to a final C++ class with accessor functions for the union members and discriminant. For each member a set of accessors must be provided as described in “Mapping for Structured T ypes” on page 14. to A union maps to a C++ class with accessor functions for the union members and discriminant. For each member a set of accessors must be provided as described in “Mapping for Structured T ypes” on page 14. In 6.14.2 remove final from class S and U In 6.18.1 remove final from class S
Actions taken:
March 22, 6013: received issue

Issue 18655: Relax constructor argument rules (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Clarification
Severity: Minor
Summary:
Currently the std::array doesn't have an efficient move constructor, passing an array by value to the constructor of a valuetype/struct isn't efficient. Instead of adding an exception to the spec we propose to relax the spec so that it just mentions that the constructor must be there, but not that arguments have to be passed by value, that is up to the implementor to decide

Resolution: We remove the restriction that the arguments have to be passed by value to the constructor of a structured type. This is a way implementations can deliver optimizations if needed. This change will not impact any user code in terms of portability
Revised Text: In 6.14.1 remove “by value” in the second line In 6.18.2 remove the last line saying “All parameters for the member initializer constructor are passed by value.”
Actions taken:
April 12, 2013: received issue

Issue 18656: Add namespace level swap (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Clarification
Severity: Minor
Summary:
Everywhere where a specialization of std::swap is mentioned also mention the need for a namespace level swap

Resolution: Accepting this issue as proposed
Revised Text: Change last line of 6.14 from A specialization of std::swap<> must be provided to exchange the values of two unions in an efficient matter. to A namespace level swap and a specialization of std::swap<> must be provided to exchange the values of two unions in an efficient matter. Change last line of 6.14.1 from A specialization of std::swap<> must be provided to exchange the values of two unions in an efficient matter. to A namespace level swap and a specialization of std::swap<> must be provided to exchange the values of two unions in an efficient matter. Change last line of 6.7.1 from For all reference types a specialization of std::swap<> must be provided to exchange the values of two references in an efficient matter. to For all reference types a namespace level swap and a specialization of std::swap<> must be provided to exchange the values of two references in an efficient matter.
Actions taken:
April 12, 2013: received issue

Issue 18660: Remove user defined literal support (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Clarification
Severity: Minor
Summary:
The fixed mapping uses operator"" and _fixed as user defined literal. This doesn't work with a C++ template, only with a class, so the usage of user defined literals should be removed

Resolution: The usage of operator”” and _fixed will be removed from the specification
Revised Text: The usage of operator”” and _fixed will be removed from the specification Revised text: In 6.15 change the line The Fixed(std::string&) constructor and Fixed operator “ “ converts a string representation of a fixedpoint literal, with an optional leading sign (+ or -) into a real fixed-point valueto The Fixed(std::string&) constructor converts a string representation of a fixed-point literal, with an optional leading sign (+ or -) into a real fixed-point value And change the example C++ from F f1 = 0.1_fixed; F f2 = 0.05_fixed; F f3 = -0.005_fixed; to F f1 (“0.1”); F f2 (“0.05”); F f3 (“-0.005”);
Actions taken:
April 12, 2013: received issue

Issue 18761: Errors on code snippes related to skeleton classes (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Clarification
Severity: Minor
Summary:
There is an error in 6.25.6 related to the skeleton classes. The skeleton classes should derive from each other, not from the traits, so it should be as below, also C_skel is lacking.


// C++
class A_skel : public virtual PortableServer::ServantBase {};
class B_skel : public virtual A_skel {};
class C_skel : public virtual A_skel {};
class D_skel : public virtual B_skel, public virtual C_skel {};


The other code bits in this section also have to be checked and see if they are ok.

Resolution:
Revised Text:
Actions taken:
June 6, 2013: received issue

Issue 18762: Code fragment should use skel class (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Clarification
Severity: Minor
Summary:

The code snippet for the _this method should be using the A_skel class which is derived from PortableServer::ServantBase, not the impl class

Resolution:
Revised Text:
Actions taken:
June 7, 2013: received issue

Issue 18832: Question on unions default member (idl2cpp11-rtf)

Click
here for this issue's archive.
Source: PrismTech (Nawel Hamouche, nawel.hamouche(at)prismtech.com)
Nature: Uncategorized Issue
Severity:
Summary:
In the section 6.14.2 on union mapping, it says :
"If there is a default case specified, the union is initialized to this default case. In case the union has an implicit default member it is initialized to that case. In all other cases it is initialized as empty."


I don't get the meaning of "empty" and it doesn't seem to be defined. For example, if we have a union with a boolean discriminator which defines the two cases true and false, what happens if we read one of the fields or if we call _d (with or without parameter)? Should they all throw BAD_PARAM?

Resolution:
Revised Text:
Actions taken:
July 25, 2013: received issue