Scroll to navigation

std::generator::promise_type(3) C++ Standard Libary std::generator::promise_type(3)

NAME

std::generator::promise_type - std::generator::promise_type

Synopsis


class generator<Ref, V, Allocator>::promise_type; (since C++23)


The promise type of std::generator.

Member functions


constructor constructs the promise_type object
(implicitly declared) (public member function)
destructor destroys the promise_type object
(implicitly declared) (public member function)
get_return_object issues the generator object
(public member function)
initial_suspend issues an awaiter for initial suspend point
(public member function)
final_suspend issues an awaiter for final suspend point
(public member function)
yield_value processes the object obtained from co_yield
(public member function)
await_transform maps the object obtained from co_await to an awaiter
[deleted] (public member function)
return_void handles co_return; or the exit out of coroutine's body
(public member function)
unhandled_exception processes exceptions that leaked from the coroutine's body
(public member function)
operator new allocates memory using Allocator
[static] (C++23) (public static member function)
operator delete deallocates memory previously obtained from operator new
[static] (C++23) (public static member function)

Example


This section is incomplete
Reason: no example

See also


noop_coroutine_promise used for coroutines with no observable effects
(C++20) (class)

Category:


* Todo no example

2024.06.10 http://cppreference.com