Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jrw972
Copy link
Contributor

@jrw972 jrw972 commented Sep 12, 2024

Problem

Union members cannot be marked @optional.

Solution

Add support for @optional. This only applies to the C++11 language mapping.

@jrw972 jrw972 self-assigned this Sep 12, 2024
@jrw972 jrw972 linked an issue Sep 12, 2024 that may be closed by this pull request
@jrw972 jrw972 force-pushed the optional-union branch 2 times, most recently from 780051a to 1d5c4a4 Compare September 17, 2024 16:18
.. news-prs: 4797
.. news-start-section: Additions
- Add support for `@optional` union members.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Add support for `@optional` union members.
- Add support for ``@optional`` union members.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or probably better as:

Suggested change
- Add support for `@optional` union members.
- Add support for :ref:`xtypes--optional` union members.

@jrw972 jrw972 marked this pull request as ready for review September 17, 2024 18:32
@optional TestStruct struct_field;
};

union TestUnion_Octet switch(long) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use this union in a test to check serialization.

@jrw972
Copy link
Contributor Author

jrw972 commented Sep 17, 2024

Add issue to xtypes spec and link in documentation.

Problem
-------

Union members cannot be marked `@optional`.

Solution
--------

Add support for `@optional`.  This only applies to the C++11 language
mapping.
@jrw972 jrw972 marked this pull request as draft September 25, 2024 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using octet disc. in union results in opendds_idl compile error

2 participants