ThreadSchedule 1.0.0
Modern C++ thread management library
Loading...
Searching...
No Matches
generator.hpp File Reference

Lazy multi-value coroutine (generator<T>). More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Detailed Description

Lazy multi-value coroutine (generator<T>).

A generator<T> represents a lazy sequence that produces values on-demand via co_yield. It is compatible with range-based for loops.

When C++23 std::generator is available (__cpp_lib_generator), a convenience alias is provided. Otherwise, the library ships its own implementation.

Requires C++20 coroutine support.

Definition in file generator.hpp.