std::generator<Ref,V,Allocator>::operator=
来自 cppreference.cn
generator& operator=( generator other ) noexcept; |
(自 C++23 起) | |
替换 generator 对象的内容。等效于
std::swap(coroutine_
,
other.coroutine_
);
std::swap(active_
,
other.active_
);
内容 |
[编辑] 参数
other | - | 要从中移动的另一个 generator |
[编辑] 返回值
*this
[编辑] 复杂度
此章节尚不完整 |
[编辑] 注解
先前从 other 获取的迭代器不会失效——它们会变成指向 *this 的迭代器。
虽然 std::generator
仅可移动赋值,但此赋值运算符在技术上是复制赋值运算符。
[编辑] 示例
此章节尚不完整 理由:无示例 |