Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

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

      From cppreference.com
      <cpp‎ |coroutine‎ |coroutine handle
       
       
      Utilities library
       
      Coroutine support
      Coroutine traits
      Coroutine handle
      No-op coroutines
      Trivial awaitables
      Range generators
      (C++23)
       
       
      Defined in header<coroutine>
      constexprbool
          operator==(std::coroutine_handle<> x,std::coroutine_handle<> y)noexcept;
      (1)(since C++20)
      constexprstd::strong_ordering
          operator<=>(std::coroutine_handle<> x,std::coroutine_handle<> y)noexcept;
      (2)(since C++20)

      Compares twostd::coroutine_handle<> valuesx andy according to their underlying addresses.

      The<,<=,>,>=, and!= operators aresynthesized fromoperator<=> andoperator== respectively.

      Contents

      [edit]Parameters

      x, y -std::coroutine_handle<> values to compare

      [edit]Return value

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

      [edit]Notes

      Although these operators are only overloaded forstd::coroutine_handle<>, other specializations ofstd::coroutine_handle are also equality comparable and three-way comparable, because they are implicitly convertible tostd::coroutine_handle<>.

      [edit]Example

      This section is incomplete
      Reason: no example
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/coroutine/coroutine_handle/operator_cmp&oldid=162095"

      [8]ページ先頭

      ©2009-2025 Movatter.jp