Namespaces
Variants

operator== (std::stop_source)

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_source & lhs, const stop_source & rhs ) noexcept ;
(自 C++20 起)

比较两个 stop_source 值。

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

!= 运算符由 operator== 合成而来。

参数

lhs, rhs - 要比较的 stop_source 对象

返回值

如果 lhs rhs 具有相同的停止状态,或两者均无停止状态,则为 true ,否则为 false