-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
P0655R1 visit<R>() #201
P0655R1 visit<R>() #201
Conversation
This is the example test case I used for this implementation. It directly mimics WG21-P0655's example cases.
|
59a7942
to
946f807
Compare
"fixup"-ed typo commit to original commit to make the entire commit easier to read. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
b614381
to
cc828c0
Compare
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.
I have only minor stylistic comments remaining. The rest looks good to me (although I am not a variant
expert). Thanks!
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
This looks good to me as well. I'll throw some test coverage together.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
LGTM pending the usual test caveats in this repo at the moment.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
All green to merge. Thanks, @NathanSWard - great work! |
Thanks! |
P0655R1 visit<R>() (microsoft#201)
Description
This is an implementation of
std::visit<R>
.Addresses issue #31
Checklist
community PRs will be delayed until the test and CI systems are online.
_Ugly
as perhttps://eel.is/c++draft/lex.name#3.1 or there are no product code changes.
verified by an STL maintainer before CI is online, leave this unchecked for
initial submission).
members, adding virtual functions, changing whether a type is an aggregate
or trivially copyable, etc.).
I changed the underlying machinery of
std::variant
to not assume the return type to be_Variant_visit_result_t
but rather have it be a templated parameter that is passed down by the callingstd::visit
function. I don't believe this causes ABI breaks, but am unsure.the C++ Working Draft as a reference (and any other cited standards).
If they were derived from a project that's already listed in NOTICE.txt,
that's fine, but please mention it. If they were derived from any other
project (including Boost and libc++, which are not yet listed in
NOTICE.txt), you must mention it here, so we can determine whether the
license is compatible and what else needs to be done.