From Jason Turner

[futures.promise]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpm_nd6z2t/{from.md → to.md} +3 -15
tmp/tmpm_nd6z2t/{from.md → to.md} RENAMED
@@ -26,13 +26,10 @@ namespace std {
26
 
27
  // setting the result with deferred notification
28
  void set_value_at_thread_exit(see below);
29
  void set_exception_at_thread_exit(exception_ptr p);
30
  };
31
-
32
- template<class R, class Alloc>
33
- struct uses_allocator<promise<R>, Alloc>;
34
  }
35
  ```
36
 
37
  For the primary template, `R` shall be an object type that meets the
38
  *Cpp17Destructible* requirements.
@@ -45,19 +42,10 @@ in the argument type of the member functions `set_value` and
45
  The `set_value`, `set_exception`, `set_value_at_thread_exit`, and
46
  `set_exception_at_thread_exit` member functions behave as though they
47
  acquire a single mutex associated with the promise object while updating
48
  the promise object.
49
 
50
- ``` cpp
51
- template<class R, class Alloc>
52
- struct uses_allocator<promise<R>, Alloc>
53
- : true_type { };
54
- ```
55
-
56
- *Preconditions:* `Alloc` meets the *Cpp17Allocator*
57
- requirements [[allocator.requirements.general]].
58
-
59
  ``` cpp
60
  promise();
61
  template<class Allocator>
62
  promise(allocator_arg_t, const Allocator& a);
63
  ```
@@ -172,11 +160,11 @@ void promise<R&>::set_value_at_thread_exit(R& r);
172
  void promise<void>::set_value_at_thread_exit();
173
  ```
174
 
175
  *Effects:* Stores the value `r` in the shared state without making that
176
  state ready immediately. Schedules that state to be made ready when the
177
- current thread exits, after all objects of thread storage duration
178
  associated with the current thread have been destroyed.
179
 
180
  *Throws:*
181
 
182
  - `future_error` if its shared state already has a stored value or
@@ -198,12 +186,12 @@ void set_exception_at_thread_exit(exception_ptr p);
198
 
199
  *Preconditions:* `p` is not null.
200
 
201
  *Effects:* Stores the exception pointer `p` in the shared state without
202
  making that state ready immediately. Schedules that state to be made
203
- ready when the current thread exits, after all objects of thread storage
204
- duration associated with the current thread have been destroyed.
205
 
206
  *Throws:* `future_error` if an error condition occurs.
207
 
208
  *Error conditions:*
209
 
 
26
 
27
  // setting the result with deferred notification
28
  void set_value_at_thread_exit(see below);
29
  void set_exception_at_thread_exit(exception_ptr p);
30
  };
 
 
 
31
  }
32
  ```
33
 
34
  For the primary template, `R` shall be an object type that meets the
35
  *Cpp17Destructible* requirements.
 
42
  The `set_value`, `set_exception`, `set_value_at_thread_exit`, and
43
  `set_exception_at_thread_exit` member functions behave as though they
44
  acquire a single mutex associated with the promise object while updating
45
  the promise object.
46
 
 
 
 
 
 
 
 
 
 
47
  ``` cpp
48
  promise();
49
  template<class Allocator>
50
  promise(allocator_arg_t, const Allocator& a);
51
  ```
 
160
  void promise<void>::set_value_at_thread_exit();
161
  ```
162
 
163
  *Effects:* Stores the value `r` in the shared state without making that
164
  state ready immediately. Schedules that state to be made ready when the
165
+ current thread exits, after all objects with thread storage duration
166
  associated with the current thread have been destroyed.
167
 
168
  *Throws:*
169
 
170
  - `future_error` if its shared state already has a stored value or
 
186
 
187
  *Preconditions:* `p` is not null.
188
 
189
  *Effects:* Stores the exception pointer `p` in the shared state without
190
  making that state ready immediately. Schedules that state to be made
191
+ ready when the current thread exits, after all objects with thread
192
+ storage duration associated with the current thread have been destroyed.
193
 
194
  *Throws:* `future_error` if an error condition occurs.
195
 
196
  *Error conditions:*
197