std::coroutine_handle<Promise>:: operator=
From cppreference.net
<
cpp
|
coroutine
|
coroutine handle
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Coroutine support
| Coroutine traits | ||||
|
(C++20)
|
||||
| Coroutine handle | ||||
|
(C++20)
|
||||
| No-op coroutines | ||||
|
(C++20)
|
||||
|
(C++20)
|
||||
| Trivial awaitables | ||||
|
(C++20)
|
||||
|
(C++20)
|
||||
| Range generators | ||||
|
(C++23)
|
std::coroutine_handle
| Member functions | ||||
|
coroutine_handle::operator=
|
||||
| Conversion | ||||
| Observers | ||||
| Control | ||||
| Promise access | ||||
| Export/import | ||||
| Non-member functions | ||||
| Helper classes | ||||
|
coroutine_handle
&
operator
=
(
std::
nullptr_t
)
noexcept
;
|
(1) | (C++20以降) |
|
coroutine_handle
&
operator
=
(
const
coroutine_handle
&
other
)
=
default
;
|
(2) | (C++20以降) |
|
coroutine_handle
&
operator
=
(
coroutine_handle
&&
other
)
=
default
;
|
(3) | (C++20以降) |
基になるアドレスを置き換えます。
1)
基盤となるアドレスをnullポインタ値で置き換えます。代入後、
*
this
はコルーチンを参照しません。この代入演算子は特殊化
std::
coroutine_handle
<
std::
noop_coroutine_promise
>
に対して宣言されていません。
2,3)
基となるアドレスを
other
のアドレスで置き換えます。コピー代入演算子とムーブ代入演算子は暗黙的に宣言されたものと同等です。
パラメータ
| その他 | - |
代入元の別の
coroutine_handle
|
戻り値
* this