std::coroutine_handle<Promise>::operator=
来自 zh.cppreference.net
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。复制和移动赋值运算符等同于隐式声明的。参数
| 其他 | - |
另一个用于赋值的
coroutine_handle
|
返回值
* this