[omniORB] generated types copy constructor problem
Duncan Grisby
duncan at grisby.org
Mon Apr 13 14:56:36 BST 2015
On Mon, 2015-04-13 at 15:44 +0200, Johnny Willemsen wrote:
> 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.
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list