A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../coroutine/generator/promise_type/final_suspend.html below:

std::generator<Ref,V,Allocator>::promise_type::final_suspend - cppreference.com

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.

[edit] Return value

An awaitable object of unspecified type whose member functions are configured to suspend the calling coroutine.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4