Namespaces
Variants

operator== (std::stop_token)

From cppreference.net
Concurrency support library
Threads
(C++11)
(C++20)
this_thread namespace
(C++11)
(C++11)
Cooperative cancellation
Mutual exclusion
Generic lock management
Condition variables
(C++11)
Semaphores
Latches and Barriers
(C++20)
(C++20)
Futures
(C++11)
(C++11)
(C++11)
Safe reclamation
Hazard pointers
Atomic types
(C++11)
(C++20)
Initialization of atomic types
(C++11) (deprecated in C++20)
(C++11) (deprecated in C++20)
Memory ordering
(C++11) (deprecated in C++26)
Free functions for atomic operations
Free functions for atomic flags
friend bool operator == ( const stop_token & lhs, const stop_token & rhs ) noexcept ;
(C++20 起)

比较两个 stop_token 值。

此函数对普通的 非限定查找 限定查找 不可见,仅当 std::stop_token 作为参数的关联类时,才能通过 实参依赖查找 找到该函数。

!= 运算符由 默认比较 机制通过 operator== 自动合成。

参数

lhs, rhs - 要比较的 stop_token

返回值

lhs rhs 具有相同的关联停止状态,或两者均无关联停止状态时返回 true ,否则返回 false