std::noop_c...tine_promise(3)
okay bestie, welcome to the std::noop_c...tine_promise(3) page from the C++ Standard Libary β it's giving deep coroutine lore, but make it cute π
β¨
β¨ NAME β¨
std::noop_coroutine_promiseβ literallystd::noop_coroutine_promise, the promise type of no-op coroutines. Periodt.
π¦ Synopsis π¦
okay so here's the declaration vibe, defined in header <coroutine>:
Defined in header <coroutine>
struct noop_coroutine_promise {}; (since C++20)
noop_coroutine_promise is the promise type of no-op coroutines.
A no-op coroutine behaves as if it:
- does nothing other than the control flow of a coroutine, and
- is suspended immediately after beginning and resumption, and
- has a coroutine state such that destroying the state is no-op, and
- never reaches its final suspended point if there is any
std::coroutine_handlereferring to it.
This section is incomplete β Reason: more precise wording
No-op coroutines can be started by std::noop_coroutine, and controlled by the coroutine handle it returns. The returned coroutine handle is of type std::noop_coroutine_handle, which is a synonym for std::coroutine_handle<std::noop_coroutine_promise>.
Some operations of no-op coroutines are determined no-op at compile time through the type std::noop_coroutine_handle.
This section is incomplete β Reason: usage of no-op coroutines
π Example π
This section is incomplete β Reason: no example
π See also π
noop_coroutine(C++20)β creates a coroutine handle that has no observable effects when resumed or destroyed. (function)noop_coroutine_handle(C++20)βstd::coroutine_handle<std::noop_coroutine_promise>, intended to refer to a no-op coroutine. (typedef)
π·οΈ Categories
- Todo with reason
- Todo no example
mwah π β source/version: http://cppreference.com, date: 2024.06.10.
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms