Documentation Home >> Headers >> <future> Header >> std::future >> std::future Move Assignment Operator

Transfer ownership of the asynchronous result associated with the one std::future object to another.

future(future&& other);

Effects:

Transfers ownership of an asynchronous state between std::future instances.

Postconditions:

The asynchronous result associated with other prior to the invocation of the constructor is associated with *this. other has no associated asynchronous result. The ownership of the asynchronous state (if any) associated with *this prior to the call is released, and the state destroyed if this is the last reference. this->valid() returns the same value that other.valid() returned before the invocation of this constructor. other.valid() returns false.

Throws:

Nothing.

Header

#include <future>

See Also