operator==, operator<=> (std::coroutine_handle)
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Coroutine traits | ||||
|
(C++20)
|
||||
| Coroutine handle | ||||
|
(C++20)
|
||||
| No-op coroutines | ||||
|
(C++20)
|
||||
|
(C++20)
|
||||
| Trivial awaitables | ||||
|
(C++20)
|
||||
|
(C++20)
|
||||
| Range generators | ||||
|
(C++23)
|
| Member functions | ||||
| Conversion | ||||
| Observers | ||||
| Control | ||||
| Promise access | ||||
| Export/import | ||||
| Non-member functions | ||||
|
operator==
operator<=>
|
||||
| Helper classes | ||||
|
定义于头文件
<coroutine>
|
||
|
constexpr
bool
operator == ( std:: coroutine_handle <> x, std:: coroutine_handle <> y ) noexcept ; |
(1) | (C++20 起) |
|
constexpr
std::
strong_ordering
operator <=> ( std:: coroutine_handle <> x, std:: coroutine_handle <> y ) noexcept ; |
(2) | (C++20 起) |
根据底层地址比较两个 std:: coroutine_handle <> 值 x 和 y 。
<
、
<=
、
>
、
>=
和
!=
运算符分别由
operator
<=>
和
operator
==
合成。
目录 |
参数
| x, y | - | std:: coroutine_handle <> 待比较的值 |
返回值
注释
尽管这些运算符仅针对 std:: coroutine_handle <> 进行了重载,但 std::coroutine_handle 的其他特化版本同样支持相等比较和三路比较,因为它们可隐式转换为 std:: coroutine_handle <> 。
示例
|
本节内容不完整
原因:缺少示例 |