[omniORB] generated types copy constructor problem
Johnny Willemsen
jwillemsen at remedy.nl
Mon Apr 13 15:00:19 BST 2015
Hi,
>> I don't know the details of the omniORB implementation, but the formal
>> IDL to C++ language mapping says the following:
>>
>> The default union constructor performs no application-visible
>> initialization of the union. It does not initialize the discriminator,
>> nor does it initialize any union members to a state useful to an
>> application. (The implementation of the default constructor can do
>> whatever type of initialization it wants to, but such initialization is
>> implementation-dependent. No compliant application can count on a union
>> ever being properly initialized by the default constructor alone.)
>
> Exactly, and that's why omniORB doesn't default-construct unions or
> allow non-initialised ones to be copied. I'm afraid that application
> code that attempts to copy a non-initialised union is invalid.
Yes, also TAO doesn't guarantee that it works to copy a non-initialised
union.
Johnny
More information about the omniORB-list
mailing list