std::generator<Ref,V,Allocator>::operator=
ja.cppreference.net より
generator& operator=( generator other ) noexcept;
|
(C++23以降) | |
ジェネレータオブジェクトの内容を置き換えます。以下と同等:
std::swap(coroutine_, other.coroutine_);
std::swap(active_, other.active_);
パラメータ
| その他 | - | 移動元となる別のジェネレータ |
戻り値
* this
計算量
| このセクションは不完全です |
注記
以前に other から取得したイテレータは無効化されません - それらは * this へのイテレータになります。
この代入演算子は技術的には
copy assignment operator
ですが、
std::generator
はmove assignableのみです。
例
|
このセクションは不完全です
理由: 例がありません |