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
operator == ( std:: coroutine_handle <> x, std:: coroutine_handle <> y ) noexcept ;
(1) (C++20부터)
(2) (C++20부터)

두 개의 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 <> 로 변환 가능하기 때문입니다.

예제