std::suspend_never
From cppreference.com
Defined in header <coroutine> | ||
struct suspend_never; | (since C++20) | |
suspend_never
is an empty class which can be used to indicate that an await expression never suspends and does not produce a value.
Contents |
[edit]Member functions
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) |
std::suspend_never::await_ready
constexprbool await_ready()constnoexcept{returntrue;} | ||
Always returns true, indicating that an await expression never suspends.
std::suspend_never::await_suspend
constexprvoid await_suspend(std::coroutine_handle<>)constnoexcept{} | ||
Does nothing.
std::suspend_never::await_resume
constexprvoid await_resume()constnoexcept{} | ||
Does nothing. An await expression does not produce a value if suspend_never
is used.
[edit]Example
This section is incomplete Reason: no example |
[edit]See also
(C++20) | indicates that an await-expression should always suspend (class) |