|
uvco 0.1
|
#include <multipromise.h>
Classes | |
| struct | YieldAwaiter_ |
Public Member Functions | |
| Generator ()=default | |
| Generator (Generator< T > &&) noexcept=delete | |
| Generator & | operator= (const Generator< T > &)=delete |
| Generator & | operator= (Generator< T > &&) noexcept=delete |
| Generator (const Generator< T > &other)=delete | |
| ~Generator ()=default | |
| MultiPromise< T > | get_return_object () |
| A generator (yielding) coroutine returns a MultiPromise. | |
| void | return_void () |
| std::suspend_never | initial_suspend () noexcept |
| Part of the coroutine protocol (see Promise). | |
| std::suspend_always | final_suspend () noexcept |
| Part of the coroutine protocol (see Promise). | |
| void | unhandled_exception () |
| Part of the coroutine protocol (see Promise). | |
| YieldAwaiter_ | yield_value (T value) |
Private Types | |
| using | PromiseCore_ = MultiPromiseCore<T> |
Private Attributes | |
| PromiseCore_ | core_ |
Generator is the promise object type for generator-type coroutines (those returning a MultiPromise).
|
private |
|
default |
|
deletenoexcept |
|
delete |
|
default |
|
inlinenoexcept |
Part of the coroutine protocol (see Promise).
|
inline |
A generator (yielding) coroutine returns a MultiPromise.
|
inlinenoexcept |
Part of the coroutine protocol (see Promise).
|
delete |
|
deletenoexcept |
|
inline |
A MultiPromise coroutine ultimately returns void. This is signaled to the caller by returning an empty std::optional.
|
inline |
|
inline |
Yield a value to the calling (awaiting) coroutine.
Equivalent to co_yield = co_await promise.yield_value() (defined in C++ standard); suspends the generator coroutine and resumes the awaiting coroutine if there is one.
If nobody is awaiting a value from this generator, the yielded value is still moved into the generator's slot, but the generator is not resumed. Upon the next co_await, the returned MultiPromiseAwaiter_ will immediately return the value without resuming the generator.
|
private |