|
|
Coroutine traits | ||||
(C++20) | ||||
Coroutine handle | ||||
(C++20) | ||||
No-op coroutines | ||||
(C++20) | ||||
(C++20) | ||||
Trivial awaitables | ||||
suspend_never (C++20) | ||||
(C++20) | ||||
Range generators | ||||
(C++23) |
Defined in header <coroutine> | ||
struct suspend_never; | (since C++20) | |
suspend_never
is an empty class which can be used to indicate that anawait expression never suspends and does not produce a value.
Contents |
await_ready | indicates that an await expression never suspends (public member function) |
await_suspend | no-op (public member function) |
await_resume | no-op (public member function) |
constexprbool await_ready()constnoexcept{returntrue;} | ||
Always returnstrue, indicating that an await expression never suspends.
constexprvoid await_suspend(std::coroutine_handle<>)constnoexcept{} | ||
Does nothing.
constexprvoid await_resume()constnoexcept{} | ||
Does nothing. An await expression does not produce a value ifsuspend_never
is used.
This section is incomplete Reason: no example |
(C++20) | indicates that an await-expression should always suspend (class)[edit] |