From Jason Turner

[future.syn]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp44ini2os/{from.md → to.md} +79 -0
tmp/tmp44ini2os/{from.md → to.md} RENAMED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Header `<future>` synopsis <a id="future.syn">[[future.syn]]</a>
2
+
3
+ ``` cpp
4
+ namespace std {
5
+ enum class future_errc {
6
+ broken_promise = implementation-defined,
7
+ future_already_retrieved = implementation-defined,
8
+ promise_already_satisfied = implementation-defined,
9
+ no_state = implementation-defined
10
+ };
11
+
12
+ enum class launch : unspecified{} {
13
+ async = unspecified{},
14
+ deferred = unspecified{},
15
+ implementation-defined
16
+ };
17
+
18
+ enum class future_status {
19
+ ready,
20
+ timeout,
21
+ deferred
22
+ };
23
+
24
+ template <> struct is_error_code_enum<future_errc> : public true_type { };
25
+ error_code make_error_code(future_errc e) noexcept;
26
+ error_condition make_error_condition(future_errc e) noexcept;
27
+
28
+ const error_category& future_category() noexcept;
29
+
30
+ class future_error;
31
+
32
+ template <class R> class promise;
33
+ template <class R> class promise<R&>;
34
+ template <> class promise<void>;
35
+
36
+ template <class R>
37
+ void swap(promise<R>& x, promise<R>& y) noexcept;
38
+
39
+ template <class R, class Alloc>
40
+ struct uses_allocator<promise<R>, Alloc>;
41
+
42
+ template <class R> class future;
43
+ template <class R> class future<R&>;
44
+ template <> class future<void>;
45
+
46
+ template <class R> class shared_future;
47
+ template <class R> class shared_future<R&>;
48
+ template <> class shared_future<void>;
49
+
50
+ template <class> class packaged_task; // not defined
51
+ template <class R, class... ArgTypes>
52
+ class packaged_task<R(ArgTypes...)>;
53
+
54
+ template <class R, class... ArgTypes>
55
+ void swap(packaged_task<R(ArgTypes...)>&, packaged_task<R(ArgTypes...)>&) noexcept;
56
+
57
+ template <class R, class Alloc>
58
+ struct uses_allocator<packaged_task<R>, Alloc>;
59
+
60
+ template <class F, class... Args>
61
+ future<invoke_result_t<decay_t<F>, decay_t<Args>...>>
62
+ async(F&& f, Args&&... args);
63
+ template <class F, class... Args>
64
+ future<invoke_result_t<decay_t<F>, decay_t<Args>...>>
65
+ async(launch policy, F&& f, Args&&... args);
66
+ }
67
+ ```
68
+
69
+ The `enum` type `launch` is a bitmask type ([[bitmask.types]]) with
70
+ elements `launch::async` and `launch::deferred`.
71
+
72
+ [*Note 1*: Implementations can provide bitmasks to specify restrictions
73
+ on task interaction by functions launched by `async()` applicable to a
74
+ corresponding subset of available launch policies. Implementations can
75
+ extend the behavior of the first overload of `async()` by adding their
76
+ extensions to the launch policy under the “as if” rule. — *end note*]
77
+
78
+ The enum values of `future_errc` are distinct and not zero.
79
+