From Jason Turner

[coroutine.noop]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpwdcp0cnv/{from.md → to.md} +14 -1
tmp/tmpwdcp0cnv/{from.md → to.md} RENAMED
@@ -12,12 +12,15 @@ coroutine referred to by `noop_coroutine_handle` [[coroutine.syn]].
12
  #### Class `coroutine_handle<noop_coroutine_promise>` <a id="coroutine.handle.noop">[[coroutine.handle.noop]]</a>
13
 
14
  ``` cpp
15
  namespace std {
16
  template<>
17
- struct coroutine_handle<noop_coroutine_promise> : coroutine_handle<>
18
  {
 
 
 
19
  // [coroutine.handle.noop.observers], observers
20
  constexpr explicit operator bool() const noexcept;
21
  constexpr bool done() const noexcept;
22
 
23
  // [coroutine.handle.noop.resumption], resumption
@@ -30,14 +33,24 @@ namespace std {
30
 
31
  // [coroutine.handle.noop.address], address
32
  constexpr void* address() const noexcept;
33
  private:
34
  coroutine_handle(unspecified);
 
35
  };
36
  }
37
  ```
38
 
 
 
 
 
 
 
 
 
 
39
  ##### Observers <a id="coroutine.handle.noop.observers">[[coroutine.handle.noop.observers]]</a>
40
 
41
  ``` cpp
42
  constexpr explicit operator bool() const noexcept;
43
  ```
 
12
  #### Class `coroutine_handle<noop_coroutine_promise>` <a id="coroutine.handle.noop">[[coroutine.handle.noop]]</a>
13
 
14
  ``` cpp
15
  namespace std {
16
  template<>
17
+ struct coroutine_handle<noop_coroutine_promise>
18
  {
19
+ // [coroutine.handle.noop.conv], conversion
20
+ constexpr operator coroutine_handle<>() const noexcept;
21
+
22
  // [coroutine.handle.noop.observers], observers
23
  constexpr explicit operator bool() const noexcept;
24
  constexpr bool done() const noexcept;
25
 
26
  // [coroutine.handle.noop.resumption], resumption
 
33
 
34
  // [coroutine.handle.noop.address], address
35
  constexpr void* address() const noexcept;
36
  private:
37
  coroutine_handle(unspecified);
38
+ void* ptr; // exposition only
39
  };
40
  }
41
  ```
42
 
43
+ ##### Conversion <a id="coroutine.handle.noop.conv">[[coroutine.handle.noop.conv]]</a>
44
+
45
+ ``` cpp
46
+ constexpr operator coroutine_handle<>() const noexcept;
47
+ ```
48
+
49
+ *Effects:* Equivalent to:
50
+ `return coroutine_handle<>::from_address(address());`
51
+
52
  ##### Observers <a id="coroutine.handle.noop.observers">[[coroutine.handle.noop.observers]]</a>
53
 
54
  ``` cpp
55
  constexpr explicit operator bool() const noexcept;
56
  ```