最終更新日時(UTC):
が更新

履歴 編集

function template
<execution>

std::execution::with_awaitable_senders::set_continuation(C++26)

template<class OtherPromise>
  requires (!same_as<OtherPromise, void>)
void set_continuation(coroutine_handle<OtherPromise> h) noexcept;

概要

継続処理のコルーチンハンドルを設定する。

テンプレートパラメータ制約

!same_as<OtherPromise, void>

効果

下記と等価。

continuation = h;
if constexpr ( requires(OtherPromise& other) { other.unhandled_stopped(); } ) {
  stopped-handler = [](void* p) noexcept -> coroutine_handle<> {
    return coroutine_handle<OtherPromise>::from_address(p)
      .promise().unhandled_stopped();
  };
} else {
  stopped-handler = &default-unhandled-stopped;
}

例外

投げない

バージョン

言語

  • C++26

処理系

参照