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::futureinstances.- Postconditions:
The asynchronous result associated with
otherprior to the invocation of the constructor is associated with*this.otherhas no associated asynchronous result. The ownership of the asynchronous state (if any) associated with*thisprior to the call is released, and the state destroyed if this is the last reference.this->valid()returns the same value thatother.valid()returned before the invocation of this constructor.other.valid()returnsfalse.- Throws:
Nothing.
Header
#include <future>