ORIGINAL
Loading...
Searching...
No Matches
Classes | Namespaces
coroutines.h File Reference

C++20 coroutine support with generator pattern implementation. More...

#include "optional.h"
#include <coroutine>
#include <exception>
Include dependency graph for coroutines.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  original::coroutine
 Namespace for coroutine-related utilities and generator implementation. More...
 
class  original::coroutine::generator< TYPE >
 Lazy sequence generator using C++20 coroutines. More...
 

Namespaces

namespace  original
 Main namespace for the project Original.
 

Detailed Description

C++20 coroutine support with generator pattern implementation.

This file implements a type-safe, lazy-evaluation generator pattern using C++20 coroutines. The generator provides a convenient way to create and consume sequences of values with minimal memory overhead and efficient suspension/resumption semantics.

Key Features:

Note
The generator suspends after each yielded value, allowing consumers to control the execution flow and memory usage.
Coroutine state is automatically destroyed when the generator goes out of scope, preventing resource leaks.