std::noop_coroutine
From cppreference.com
Defined in header <coroutine>
|
||
std::noop_coroutine_handle noop_coroutine() noexcept; |
(since C++20) | |
Returns a coroutine handle referring to a no-op coroutine.
If there has been already a coroutine state of no-op coroutine, it is unspecified whether subsequent call to noop_coroutine
returns a previously obtained coroutine handle, or a coroutine handle referring to a new coroutine state of no-op coroutine.
Parameters
(none)
Return value
A std::noop_coroutine_handle referring to a no-op coroutine.
Notes
Return values from different calls to noop_coroutine
may and may not compare equal.
No-op coroutines are not required to be defined, and noop_coroutine
may only return a noop_coroutine_handle
referring to a coroutine state object without starting a coroutine.
Example
This section is incomplete Reason: no example |
See also
(C++20) |
used for coroutines with no observable effects (class) |
(C++20) |
std::coroutine_handle<std::noop_coroutine_promise>, intended to refer to a no-op coroutine (typedef) |