public member function
<future>

std::packaged_task::swap

void swap (packaged_task& x) noexcept;
Swap packaged_task
Exchanges the shared state and stored task with x .

Parameters

x
Another packaged_task object of the same type (with the same template parameters, Ret and Args...).

Return value

none

Data races

Both x and the object are modified.

Exception safety

No-throw guarantee: never throws exceptions.

See also