17
Language support library
[support]
17.12
Coroutines
[support.coroutine]
17.12.6
Trivial awaitables
[coroutine.trivial.awaitables]
namespace
std
{
struct
suspend_never
{
constexpr
bool
await_ready
(
)
const
noexcept
{
return
true
;
}
constexpr
void
await_suspend
(
coroutine_handle
<
>
)
const
noexcept
{
}
constexpr
void
await_resume
(
)
const
noexcept
{
}
}
;
struct
suspend_always
{
constexpr
bool
await_ready
(
)
const
noexcept
{
return
false
;
}
constexpr
void
await_suspend
(
coroutine_handle
<
>
)
const
noexcept
{
}
constexpr
void
await_resume
(
)
const
noexcept
{
}
}
;
}
1
#
[
Note
1
:
The types
suspend_never
and
suspend_always
can be used to indicate that an
await-expression
either never suspends or always suspends, and in either case does not produce a value
.
—
end note
]