命名空间
变体
操作

operator==(std::stop_token)

来自 cppreference.cn
< cpp‎ | thread‎ | stop token
 
 
并发支持库
线程
(C++11)
(C++20)
this_thread 命名空间
(C++11)
(C++11)
(C++11)
协同取消
互斥
(C++11)
通用锁管理
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
条件变量
(C++11)
信号量
闩锁和栅栏
(C++20)
(C++20)
期物
(C++11)
(C++11)
(C++11)
(C++11)
安全回收
(C++26)
Hazard Pointers
原子类型
(C++11)
(C++20)
原子类型的初始化
(C++11)(在 C++20 中弃用)
(C++11)(在 C++20 中弃用)
内存顺序
(C++11)(在 C++26 中弃用)
原子操作的自由函数
原子标志的自由函数
 
 
friend bool operator==( const stop_token& lhs, const stop_token& rhs ) noexcept;
(自 C++20 起)

比较两个 stop_token 值。

此函数对于普通的非限定查找限定查找是不可见的,并且只能通过实参依赖查找在 std::stop_token 是实参的关联类时找到。

!= 运算符是从 operator== 合成 的。

[编辑] 参数

lhs, rhs - 要比较的 stop_token

[编辑] 返回值

true 如果 lhsrhs 具有相同的关联停止状态,或者都未关联停止状态,否则为 false