Defined in header <coroutine> | ||
|---|---|---|
struct suspend_always; | (since C++20) |
suspend_always is an empty class which can be used to indicate that an await expression always suspends and does not produce a value.
| await_ready
(C++20) | indicates that an await expression always suspends (public member function) |
| await_suspend
(C++20) | no-op (public member function) |
| await_resume
(C++20) | no-op (public member function) |
constexpr bool await_ready() const noexcept { return false; }
| (since C++20) |
Always returns false, indicating that an await expression always suspends.
constexpr void await_suspend( std::coroutine_handle<> ) const noexcept {}
| (since C++20) |
Does nothing.
constexpr void await_resume() const noexcept {}
| (since C++20) |
Does nothing. An await expression does not produce a value if suspend_always is used.
|
(C++20) | indicates that an await-expression should never suspend (class) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/coroutine/suspend_always