Documentation Home >> Headers >> <future> Header >> std::future >> std::future Move Constructor

Construct one std::future object from another, transferring ownership of the asynchronous result associated with the other std::future object to the newly-constructed instance.

future(future&& other);

Effects:

Move-constructs a new std::future instance from other.

Postconditions:

The asynchronous result associated with other prior to the invocation of the constructor is associated with the newly-constructed std::future object. other has no associated asynchronous result. 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