-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[ntuple] add support for std::optional<T> #15482
Conversation
Test Results 9 files 9 suites 1d 16h 50m 24s ⏱️ Results for commit 83438bc. ♻️ This comment has been updated with latest results. |
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.
Looks good to me in principle! Just two nits and a question.
|
||
/// Given a pointer to an std::optional<T> in from, extract a pointer to the value T* and a pointer | ||
/// to the engagement boolean. Assumes that an std::optional<T> is stored as | ||
/// `struct { T t; bool engagement; };` |
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.
Can there be cases where this is not true? Can/should we check for this?
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.
We rely on the unit tests to catch when this is not the case. I added some more testing on the object sizes and alignments.
Co-authored-by: Florine de Geus <git@fwdg.nl>
No description provided.