Init
This commit is contained in:
38
cppdraft/coroutine/traits.md
Normal file
38
cppdraft/coroutine/traits.md
Normal file
@@ -0,0 +1,38 @@
|
||||
[coroutine.traits]
|
||||
|
||||
# 17 Language support library [[support]](./#support)
|
||||
|
||||
## 17.13 Coroutines [[support.coroutine]](support.coroutine#coroutine.traits)
|
||||
|
||||
### 17.13.3 Coroutine traits [coroutine.traits]
|
||||
|
||||
#### [17.13.3.1](#general) General [[coroutine.traits.general]](coroutine.traits.general)
|
||||
|
||||
[1](#general-1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L5798)
|
||||
|
||||
Subclause [coroutine.traits] defines requirements on classes representing[*coroutine traits*](#def:coroutine_traits),
|
||||
and defines the class templatecoroutine_traits that meets those requirements[.](#general-1.sentence-1)
|
||||
|
||||
#### [17.13.3.2](#primary) Class template coroutine_traits [[coroutine.traits.primary]](coroutine.traits.primary)
|
||||
|
||||
[1](#primary-1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L5808)
|
||||
|
||||
The header [<coroutine>](coroutine.syn#header:%3ccoroutine%3e "17.13.2 Header <coroutine> synopsis [coroutine.syn]") defines the primary templatecoroutine_traits such that
|
||||
if ArgTypes is a parameter pack of types and
|
||||
if the [*qualified-id*](expr.prim.id.qual#nt:qualified-id "7.5.5.3 Qualified names [expr.prim.id.qual]") R::promise_type is valid and
|
||||
denotes a type ([[temp.deduct]](temp.deduct "13.10.3 Template argument deduction")),
|
||||
then coroutine_traits<R, ArgTypes...> has the following publicly
|
||||
accessible member:using promise_type = typename R::promise_type;
|
||||
|
||||
Otherwise, coroutine_traits<R, ArgTypes...> has no members[.](#primary-1.sentence-2)
|
||||
|
||||
[2](#primary-2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L5822)
|
||||
|
||||
Program-defined specializations of this template shall define a publicly
|
||||
accessible nested type named promise_type[.](#primary-2.sentence-1)
|
||||
Reference in New Issue
Block a user