From Jason Turner

[coroutine.handle.con]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpdlsqiyi5/{from.md → to.md} +27 -0
tmp/tmpdlsqiyi5/{from.md → to.md} RENAMED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Construct/reset <a id="coroutine.handle.con">[[coroutine.handle.con]]</a>
2
+
3
+ ``` cpp
4
+ constexpr coroutine_handle() noexcept;
5
+ constexpr coroutine_handle(nullptr_t) noexcept;
6
+ ```
7
+
8
+ *Ensures:* `address() == nullptr`.
9
+
10
+ ``` cpp
11
+ static coroutine_handle from_promise(Promise& p);
12
+ ```
13
+
14
+ *Preconditions:* `p` is a reference to a promise object of a coroutine.
15
+
16
+ *Returns:* A coroutine handle `h` referring to the coroutine.
17
+
18
+ *Ensures:* `addressof(h.promise()) == addressof(p)`.
19
+
20
+ ``` cpp
21
+ coroutine_handle& operator=(nullptr_t) noexcept;
22
+ ```
23
+
24
+ *Ensures:* `address() == nullptr`.
25
+
26
+ *Returns:* `*this`.
27
+