std::generator<Ref,V,Allocator>::operator=
來自 cppreference.com
| generator& operator=( generator other ) noexcept; |
(C++23 起) | |
替換生成器物件的內容。等同於
std::swap(coroutine_, other.coroutine_);
std::swap(active_, other.active_);
目錄 |
[編輯] 引數
| 其他 | - | 要從中移動的另一個生成器 |
[編輯] 返回值
*this
[編輯] 複雜度
| 本節不完整 |
[編輯] 註解
以前從 other 獲取的迭代器不會失效——它們會變成指向 *this 的迭代器。
此賦值運算子在技術上是複製賦值運算子,儘管 std::generator 僅支援移動賦值。
[編輯] 示例
| 本節不完整 原因:無示例 |