A synchronous coroutine generator that lazily yields a sequence of values.

Synopsis

Declared in <folly/coro/Generator.h>

template<typename T>
class Generator;

Types

Name

Description

iterator

Input iterator over the values produced by the generator.

promise_type

Coroutine promise type that drives a Generator and its nested children.

Member Functions

Name

Description

Generator [constructor]

Constructors

~Generator [destructor]

Destroys the generator and its underlying coroutine, if any.

operator=

Assignment operators

begin

Starts the generator and returns an iterator to the first element.

end

Returns an iterator marking the end of the sequence.

swap

Swaps the state of this generator with another.

Friends

Name

Description

folly::coro::Generator::promise_type

Coroutine promise type that drives a Generator and its nested children.

folly::coro::tag_invoke

Builds a Generator by invoking f with a... via co_invoke.

Non-Member Functions

Name

Description

swap

Swaps the state of two generators.

Created with MrDocs