Init
This commit is contained in:
23
cppdraft/coroutine/trivial/awaitables.md
Normal file
23
cppdraft/coroutine/trivial/awaitables.md
Normal file
@@ -0,0 +1,23 @@
|
||||
[coroutine.trivial.awaitables]
|
||||
|
||||
# 17 Language support library [[support]](./#support)
|
||||
|
||||
## 17.13 Coroutines [[support.coroutine]](support.coroutine#coroutine.trivial.awaitables)
|
||||
|
||||
### 17.13.6 Trivial awaitables [coroutine.trivial.awaitables]
|
||||
|
||||
[ð](#lib:suspend_never)
|
||||
|
||||
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](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L6335)
|
||||
|
||||
[*Note [1](#note-1)*:
|
||||
|
||||
The types suspend_never and suspend_always can be used
|
||||
to indicate that an [*await-expression*](expr.await#nt:await-expression "7.6.2.4 Await [expr.await]") either never
|
||||
suspends or always suspends, and in either case does not produce a value[.](#1.sentence-1)
|
||||
|
||||
â *end note*]
|
||||
Reference in New Issue
Block a user