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 .

引數

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

返回值



資料競爭

x 和該物件都將被修改。

異常安全

無異常保證: 絕不丟擲異常。

另見