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

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

packaged_task(packaged_task&& other);

Effects:

Constructs a new std::packaged_task instance.

Postconditions:

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

Throws:

Nothing.

Header

#include <future>

See Also