2.2.4.8 Unencapsulated Union
These extensions extend the specification for marshaling unions to allow [in] or [in,out] parameters to be used as the discriminant for [out] or [in,out] unencapsulated unions. As specified in [C706] section 14.3.8, the discriminant of an unencapsulated union MUST be marshaled both as the parameter specified in the switch_is construct and as the first part of the union representation. This custom-marshaling is extended as follows: The discriminant of the unencapsulated union MUST be marshaled as the parameter specified in the switch_is construct in the input or output octet stream(s) specified by the directional attribute(s) of the parameter. In addition, the discriminant MUST be marshaled as the first part of the union representation as specified in [C706] section 14.3.8, in the input or output octet stream(s) specified by the directional attribute(s) of the union.