Transfer ownership of the asynchronous result associated with one std::packaged_task
object to another.
packaged_task& operator=(packaged_task&& other);
- Effects:
Transfer ownership of the asynchronous result and task associated with
otherto*this. If*thisalready had an associated asynchronous result, that asynchronous result is made ready with an exception of typestd::future_error, and an error code of __broken_packagedtask_.- Postconditions:
The asynchronous result and task associated with
otherprior to the invocation of the move-assignment operator is associated with the*this.otherhas no associated asynchronous result or task.- Returns:
*this- Throws:
Nothing.
Header
#include <future>