Issue 18832: Question on unions default member (idl2cpp11-rtf) 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 Discussion: End of Annotations:===== ogle-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-forwarded-message-id:content-type:x-gm-message-state; bh=UP8kp+dASeh/HNsbHNaty8BbPeavtzeFumBuBJj63cw=; b=mUWZ1KDpbpASBzKLFHhVy2GT24z6f34JUTxlcR+y1BA8rBvxnIrZZbpKRGfhOwJboQ WHrtiBj2+6BxgWf+ByUC6/rGQXGMnHVE+bQxecOdeb5KczBpFeeKJ1dRTKOmeZjx14qk e4xUXfHPMIIwCXkqZxKIwwJq2EzE68QGTHHcYRSsANkzIbV4HYHFQlYOvR5HNJPpaO9x Fyh66qHTrHOERw/XE/8pFsDngeuSafHteM8Cd54v6paG2KJcuwNhSBFP4UC4j2aWHDyp k7tHEpxTKLt9U3CM5qMkpKlJzfxzusrVSMmfSXklrhLCofL6VJDhtBgH0BM4L/0qtSNk n8Pg== X-Received: by 10.180.82.196 with SMTP id k4mr1373889wiy.0.1374743792677; Thu, 25 Jul 2013 02:16:32 -0700 (PDT) Date: Thu, 25 Jul 2013 11:16:31 +0200 From: Nawel Hamouche User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120623 Thunderbird/10.0.5 To: idl2cpp11-rtf@omg.org Subject: Question on unions default member X-Forwarded-Message-Id: X-Gm-Message-State: ALoCoQkz3H7RiRlaJn/f8cgKvkOnf+xIkO6wNgQ/S8yuioga9avfHFXFkhCNokGfgQ/9+vDJCzV6 X-Virus-Scanned: amavisd-new at omg.org -------- Original Message -------- Subject: Another question on the IDL to c++11 mapping Date: Tue, 16 Jul 2013 15:43:29 +0200 From: Philippe Daouadi To: Johnny Willemsen CC: Nawel Hamouche Hi, 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? Regards, Philippe