generator( const generator& ) = delete; | (1) | (since C++23) |
generator( generator&& other ) noexcept; | (2) | (since C++23) |
Constructs a generator
.
coroutine_
with std::exchange(other.coroutine_, {})
, and the underlying stack of coroutine handles (active_
) with std::exchange(other.active_, nullptr)
. Note, that the iterators, previously obtained from other
, are not invalidated, but become iterators into *this
.other | - | a generator object to be moved in. |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/coroutine/generator/generator