Skip to content
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

Changing state should never cause an empty state #11

ned14 opened this issue May 10, 2017 · 0 comments


Copy link

commented May 10, 2017

No description provided.

@ned14 ned14 added the bug label May 10, 2017
@ned14 ned14 added this to the post-peer-review-1 milestone May 10, 2017
@ned14 ned14 changed the title Expected should never have a valueless state Changing state should never cause an empty state May 19, 2017
ned14 added a commit that referenced this issue May 20, 2017
…le. Outcomes and Expected will now

not lose previous state during assignment or emplacement if the existing state's type has a nothrow
move or copy constructor. It does this by moving the existing state onto the stack before trying to
set the new state, and if that throws it restores the previous state. This new code path only activates
if any of the types stored have throwing move constructors.
@ned14 ned14 closed this May 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.