Namespaces
Variants

operator==, operator<=> (std::coroutine_handle)

From cppreference.net
Utilities library
Coroutine support
Coroutine traits
Coroutine handle
No-op coroutines
Trivial awaitables
Range generators
(C++23)
定義済みヘッダー <coroutine>
constexpr bool
演算子 == ( std:: coroutine_handle <> x, std:: coroutine_handle <> y ) noexcept ;
(1) (C++20以降)
constexpr std:: strong_ordering
演算子 <=> ( std:: coroutine_handle <> x, std:: coroutine_handle <> y ) noexcept ;
(2) (C++20以降)

2つの std:: coroutine_handle <> 値を、それらの基盤となるアドレスに従って比較します。 x y を比較します。

< <= > >= 、および != 演算子は、 それぞれ operator <=> および operator == から合成されます。

目次

パラメータ

x, y - std:: coroutine_handle <> 比較する値

戻り値

1) x. address ( ) == y. address ( )
2) std:: compare_three_way { } ( x. address ( ) , y. address ( ) )

注記

これらの演算子は std:: coroutine_handle <> に対してのみオーバーロードされていますが、 std::coroutine_handle の他の特殊化も等値比較および三方比較が可能です。なぜなら、それらは暗黙的に std:: coroutine_handle <> に変換可能であるためです。