On this page
std::suspend_never
Defined in header <coroutine> |
||
---|---|---|
|
(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.
Member functions
await_ready
(C++20)
|
indicates that an await expression never suspends (public member function) |
await_suspend
(C++20)
|
no-op (public member function) |
await_resume
(C++20)
|
no-op (public member function) |
std::suspend_never::await_ready
|
(since C++20) |
Always returns true
, indicating that an await expression never suspends.
std::suspend_never::await_suspend
|
(since C++20) |
Does nothing.
std::suspend_never::await_resume
|
(since C++20) |
Does nothing. An await expression does not produce a value if suspend_never
is used.
Example
See also
(C++20)
|
indicates that an await-expression should always suspend (class) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/coroutine/suspend_never