std::generator<Ref,V,Allocator>::operator=
来自cppreference.com
工具库
协程支持
| 协程特征 | ||||
(C++20) | ||||
| 协程句柄 | ||||
(C++20) | ||||
| 无操作协程 | ||||
(C++20) | ||||
(C++20) | ||||
| 平凡可等待体 | ||||
(C++20) | ||||
(C++20) | ||||
| 范围生成器 | ||||
(C++23) |
范围库
std::generator
| 成员函数 | ||||
generator::operator= | ||||
| promise_type | ||||
| 迭代器 | ||||
generator& operator=( generator other ) noexcept; | (C++23 起) | |
替换生成器对象的内容。等价于:
std::swap(coroutine_, other.coroutine_);
std::swap(active_, other.active_);
参数
| other | - | 要被移动的生成器对象 |
返回值
*this
复杂度
| 本节未完成 |
注解
来自 other 的迭代器不会失效 – 他们现在是 *this 中的迭代器。
这个赋值运算符技术上是一个复制赋值运算符,虽然 std::generator 仅可移动赋值。
示例
| 本节未完成 原因:暂无示例 |