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

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

promise(promise&& other);

Effects:

Constructs a new std::promise instance.

Postconditions:

The asynchronous result associated with other prior to the invocation of the constructor is associated with the newly-constructed std::promise object. other has no associated asynchronous result.

Throws:

Nothing.

Header

#include <future>

See Also