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)
Definiert im Header <coroutine>
constexpr bool
operator == ( std:: coroutine_handle <> x, std:: coroutine_handle <> y ) noexcept ;
(1) (seit C++20)
(2) (seit C++20)

Vergleicht zwei std:: coroutine_handle <> Werte x und y entsprechend ihrer zugrundeliegenden Adressen.

Die < -, <= -, > -, >= - und != -Operatoren werden synthetisiert aus operator <=> beziehungsweise operator == .

Inhaltsverzeichnis

Parameter

x, y - std:: coroutine_handle <> zu vergleichende Werte

Rückgabewert

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

Hinweise

Obwohl diese Operatoren nur für std:: coroutine_handle <> überladen sind, sind andere Spezialisierungen von std::coroutine_handle ebenfalls auf Gleichheit vergleichbar und mittels Drei-Wege-Vergleich vergleichbar, da sie implizit in std:: coroutine_handle <> konvertierbar sind.

Beispiel