rosidl
rosidl copied to clipboard
Add @optional support to `rosidl_generator_cpp`
Description
In Draft state since there are downstream rmw problems (tested with fastrps). I assume similar problems will occur with other rmw implementations.
For example calling .size() on the const class std::optional<std::__cxx11::basic_string<char> >
// Member: optional_string
current_alignment += padding +
eprosima::fastcdr::Cdr::alignment(current_alignment, padding) +
(ros_message.optional_string.size() + 1);
A similar problem occurs with containers.
Fixes #850
Is this user-facing behavior change?
Since this adds optionals users will not have any breaking changes.