table of contents
other versions
- Tumbleweed 2026.11.13-1.1
- Leap-16.0
| std::generator::operator=(3) | C++ Standard Libary | std::generator::operator=(3) |
NAME¶
std::generator::operator= - std::generator::operator=
Synopsis¶
generator& operator=( generator other ) noexcept; (since C++23)
Replaces the contents of the generator object. Equivalent to:
std::swap(coroutine_, other.coroutine_); std::swap(active_, other.active_);
Parameters¶
other - another generator to be moved from
Return value¶
*this
Complexity¶
This section is incomplete
Notes¶
Iterators previously obtained from other are not invalidated – they become iterators into *this.
This assignment operator is technically a copy assignment operator, although std::generator is only move assignable.
Example¶
This section is incomplete
Reason: no example
| 2026.11.10 | http://cppreference.com |