swap(std::stop_source)

< cpp‎ | thread‎ | stop source
friend void swap( stop_source &lhs, stop_source &rhs ) noexcept;
(C++20 起)

std::stop_source 重载 std::swap 算法。交换 lhsrhs 的停止状态。等效地调用 lhs.swap(rhs)

此函数对通常无限定有限定查找不可见,而只能在 std::stop_source 为参数的关联类时由实参依赖查找找到。

参数

lhs, rhs - 要交换的 stop_source

返回值

(无)