A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/algorithm/../ranges/../coroutine/generator/operator=.html below:

std::generator<Ref,V,Allocator>::operator= - cppreference.com

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_);

[edit] Parameters other - another generator to be moved from [edit] Return value

*this

[edit] Complexity [edit] 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.

[edit] Example

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4