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

履歴 編集

function
<coroutine>

std::coroutine_handle::代入演算子(C++20)

coroutine_handle& operator=(nullptr_t) noexcept;

概要

コルーチンハンドルをリセットし、有効なコルーチンを指さない状態にする。

戻り値

*this

事後条件

address() == nullptr

例外

投げない

#include <cassert>
#include <coroutine>

int main()
{
  std::coroutine_handle<> h;
  h = nullptr;
  assert(h.address() == nullptr);
}

出力

バージョン

言語

  • C++20

処理系

関連項目