Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Changing state should never cause an empty state #11
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.