std::coroutine_handle<Promise>::operator=
< cpp | coroutine | coroutine handle
|
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) 替换底层地址为空指针值。赋值后, *this 不指代协程。此赋值运算符不对特化 std::coroutine_handle<std::noop_coroutine_promise> 声明。
2-3) 替换底层地址为
other 的底层地址。复制与移动赋值运算符等价于隐式声明者。参数
| other | - | 作为赋值来源的另一 coroutine_handle |
返回值
*this 。