-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3.2] Fix incorrect serializing of std::optional when value is not provided - (GH #1189) #1364
Conversation
@heifner @arhag One concern I have is that this PR changes the serialization output for structs containing |
I don't anticipate any issue here. |
unittests/abi_tests.cpp
Outdated
} | ||
|
||
{ | ||
// check conversion when the first optional members is missing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first
should be second
in the comment.
unittests/abi_tests.cpp
Outdated
} | ||
|
||
{ | ||
// check conversion when all optional members are provided |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be last.
When serializing a
std::optional
field, and a value is not provided for thestd::optional
, we need to add into the serialization the flag specifying that a missing value is serialized. Prior to this PR, the flag was missing.