Scroll to navigation

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

NAME

std::generator::~generator - std::generator::~generator

Synopsis


~generator(); (since C++23)


Destructs the generator object.


Given coroutine_ as the underlying coroutine object, equivalent to:


if (coroutine_)
coroutine_.destroy();


Note, that destroying the root generator effectively destroys the entire stack of
yielded generators, because the ownership of recursively yielded generators is held
in awaitable objects in the coroutine frame of the yielding generator.

Complexity


This section is incomplete

Example


This section is incomplete
Reason: no example

Categories:


* Todo without reason
* Todo no example

2024.06.10 http://cppreference.com