|
wwa-coro 0.0.1
Yet Another C++20 Coroutine Library
|
Synchronous generator. More...
#include <coroutine>#include <exception>#include <iterator>#include <memory>#include <ranges>#include <type_traits>#include <utility>#include "detail.h"#include "exceptions.h"Go to the source code of this file.
Classes | |
| class | wwa::coro::iterator |
| An input iterator that produces values of type Result. More... | |
| class | wwa::coro::promise_type |
| An synchronous generator that produces values of type Result. More... | |
Namespaces | |
| namespace | wwa |
| namespace | wwa::coro |
| Library namespace. | |
Functions | |
| wwa::coro::~generator () | |
| Destructor. | |
| iterator | wwa::coro::begin () |
| Returns an iterator to the current item of the generator. | |
| constexpr iterator | wwa::coro::end () const noexcept |
| Returns a sentinel iterator that marks the end of the generator. | |
| wwa::coro::generator () noexcept=default | |
| Default constructor. | |
| wwa::coro::generator (generator &&other) noexcept | |
| Move constructor. | |
| generator & | wwa::coro::operator= (generator &&other) noexcept |
| Move assignment operator. | |
Synchronous generator.
This file contains the definition of a synchronous generator class template. The generator template class allows for the creation of coroutine-based generators that produce values of a specified type. It provides an interface for iterating over the generated values using range-based for loops or manual iteration.
Example usage:
Definition in file generator.h.