From Jason Turner

[exec.opstate]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmph89r82rn/{from.md → to.md} +42 -0
tmp/tmph89r82rn/{from.md → to.md} RENAMED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Operation states <a id="exec.opstate">[[exec.opstate]]</a>
2
+
3
+ ### General <a id="exec.opstate.general">[[exec.opstate.general]]</a>
4
+
5
+ The `operation_state` concept defines the requirements of an operation
6
+ state type [[exec.async.ops]].
7
+
8
+ ``` cpp
9
+ namespace std::execution {
10
+ template<class O>
11
+ concept operation_state =
12
+ derived_from<typename O::operation_state_concept, operation_state_t> &&
13
+ requires (O& o) {
14
+ start(o);
15
+ };
16
+ }
17
+ ```
18
+
19
+ If an `operation_state` object is destroyed during the lifetime of its
20
+ asynchronous operation [[exec.async.ops]], the behavior is undefined.
21
+
22
+ [*Note 1*: The `operation_state` concept does not impose requirements
23
+ on any operations other than destruction and `start`, including copy and
24
+ move operations. Invoking any such operation on an object whose type
25
+ models `operation_state` can lead to undefined behavior. — *end note*]
26
+
27
+ The program is ill-formed if it performs a copy or move construction or
28
+ assignment operation on an operation state object created by connecting
29
+ a library-provided sender.
30
+
31
+ ### `execution::start` <a id="exec.opstate.start">[[exec.opstate.start]]</a>
32
+
33
+ The name `start` denotes a customization point object that starts
34
+ [[exec.async.ops]] the asynchronous operation associated with the
35
+ operation state object. For a subexpression `op`, the expression
36
+ `start(op)` is ill-formed if `op` is an rvalue. Otherwise, it is
37
+ expression-equivalent to `MANDATE-NOTHROW(op.start())`.
38
+
39
+ If `op.start()` does not start [[exec.async.ops]] the asynchronous
40
+ operation associated with the operation state `op`, the behavior of
41
+ calling `start(op)` is undefined.
42
+