From Jason Turner

[coroutine.handle.noop]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpdhzie4zy/{from.md → to.md} +75 -0
tmp/tmpdhzie4zy/{from.md → to.md} RENAMED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Class `coroutine_handle<noop_coroutine_promise>` <a id="coroutine.handle.noop">[[coroutine.handle.noop]]</a>
2
+
3
+ ``` cpp
4
+ namespace std {
5
+ template<>
6
+ struct coroutine_handle<noop_coroutine_promise> : coroutine_handle<>
7
+ {
8
+ // [coroutine.handle.noop.observers], observers
9
+ constexpr explicit operator bool() const noexcept;
10
+ constexpr bool done() const noexcept;
11
+
12
+ // [coroutine.handle.noop.resumption], resumption
13
+ constexpr void operator()() const noexcept;
14
+ constexpr void resume() const noexcept;
15
+ constexpr void destroy() const noexcept;
16
+
17
+ // [coroutine.handle.noop.promise], promise access
18
+ noop_coroutine_promise& promise() const noexcept;
19
+
20
+ // [coroutine.handle.noop.address], address
21
+ constexpr void* address() const noexcept;
22
+ private:
23
+ coroutine_handle(unspecified);
24
+ };
25
+ }
26
+ ```
27
+
28
+ ##### Observers <a id="coroutine.handle.noop.observers">[[coroutine.handle.noop.observers]]</a>
29
+
30
+ ``` cpp
31
+ constexpr explicit operator bool() const noexcept;
32
+ ```
33
+
34
+ *Returns:* `true`.
35
+
36
+ ``` cpp
37
+ constexpr bool done() const noexcept;
38
+ ```
39
+
40
+ *Returns:* `false`.
41
+
42
+ ##### Resumption <a id="coroutine.handle.noop.resumption">[[coroutine.handle.noop.resumption]]</a>
43
+
44
+ ``` cpp
45
+ constexpr void operator()() const noexcept;
46
+ constexpr void resume() const noexcept;
47
+ constexpr void destroy() const noexcept;
48
+ ```
49
+
50
+ *Effects:* None.
51
+
52
+ *Remarks:* If `noop_coroutine_handle` is converted to
53
+ `coroutine_handle<>`, calls to `operator()`, `resume` and `destroy` on
54
+ that handle will also have no observable effects.
55
+
56
+ ##### Promise access <a id="coroutine.handle.noop.promise">[[coroutine.handle.noop.promise]]</a>
57
+
58
+ ``` cpp
59
+ noop_coroutine_promise& promise() const noexcept;
60
+ ```
61
+
62
+ *Returns:* A reference to the promise object associated with this
63
+ coroutine handle.
64
+
65
+ ##### Address <a id="coroutine.handle.noop.address">[[coroutine.handle.noop.address]]</a>
66
+
67
+ ``` cpp
68
+ constexpr void* address() const noexcept;
69
+ ```
70
+
71
+ *Returns:* `ptr`.
72
+
73
+ *Remarks:* A `noop_coroutine_handle`’s `ptr` is always a non-null
74
+ pointer value.
75
+