table of contents
- Tumbleweed 2026.11.13-1.1
- Leap-16.0
| std::generator::promise_type::final_suspend(3) | C++ Standard Libary | std::generator::promise_type::final_suspend(3) |
NAME¶
std::generator::promise_type::final_suspend - std::generator::promise_type::final_suspend
Synopsis¶
auto final_suspend() noexcept; (since C++23)
Let x be some generator object. final_suspend does the following:
1. Pops the coroutine handle from the top of *active_.
2. If *x.active_ is not empty, resumes execution of the coroutine referred to
by
x.active_->top(). If it is empty, control flow returns to the current
coroutine caller
or resumer.
A handle referring to the coroutine whose promise object is *this must be at the top of *x.active_ of x. This function must be called by the coroutine upon reaching its final suspend point. Otherwise, the behavior is undefined.
Return value¶
An awaitable object of unspecified type whose member functions are configured to suspend the calling coroutine.
| 2026.11.10 | http://cppreference.com |