Closed mikegratton closed 9 months ago
@mikegratton
Regretfully, the proposed implementation contained in this PR is against the specification. According to the IDL to C++11 language mapping section 6.14.2:
The _d discriminator modifier can only be used to set the discriminant to a value within the same union member.
Consequently, I am going to close this PR.
Simplify union types to never throw. Changing the discriminator always succeeds, and accessing a non-active member is legal.
For example, these changes make the following legal