Documentation Home >> Headers >> <exception_ptr> Header >> std::exception_ptr >> std::exception_ptr Copy-Assignment Operator

Make one std::exception_ptr object reference the same stored exception as another instance.

exception_ptr& operator=(exception_ptr const& other);

Effects:

If other has a stored exception, then *this references the same stored exception. If *this had a stored exception prior to the call, and it was the only std::exception_ptr instance referencing that stored exception, destroy that stored exception.

Returns:

*this

Postconditions:

*this==other is true. *this!=other is false.

Throws:

Nothing.

Header

#include <exception_ptr>

See Also