Exchange ownership of the asynchronous results associated with two std::packaged_task
objects.
void swap(packaged_task& other);
- Effects:
Exchange ownership of the asynchronous results and tasks associated with
otherand*this.- Postconditions:
The asynchronous result and task associated with
otherprior to the invocation ofswap(if any) is associated with*this. The asynchronous result and task associated with*thisprior to the invocation ofswap(if any) is associated withother- Throws:
Nothing.
Header
#include <future>