-
Notifications
You must be signed in to change notification settings - Fork 20
/
main.html
216 lines (182 loc) · 8.39 KB
/
main.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<!--
<script src="bower_components/platform/platform.js"></script>
<link rel="import" href="bower_components/cxx-html-doc-framework/framework.html"/>
-->
<script src="bower_components/webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="bower_components/cxx-html-doc-framework/framework.html"/>
</head>
<body unresolved="">
<cxx-titlepage stage="ts">
<cxx-docnum>P0159R0</cxx-docnum>
<time pubdate="">2015-10-22</time>
<cxx-editor>
Artur Laksberg<br/>
Microsoft Corp.<br/>
<cxx-email>[email protected]</cxx-email>
</cxx-editor>
<h1>Technical Specification for C++ Extensions for Concurrency</h1>
</cxx-titlepage>
<cxx-toc></cxx-toc>
<cxx-foreign-index id="cxx" src="cxx_N3797_index.json" name="C++14"></cxx-foreign-index>
</cxx-clause>
<cxx-clause id="general">
<h1>General</h1>
<cxx-section id="general.namespaces">
<h1>Namespaces, headers, and modifications to standard classes</h1>
<cxx-ednote>This section reflects the consensus between the LWG and LEWG at the
<a href="http://wiki.edg.com/twiki/bin/view/Wg21chicago2013/FundamentalsTS#What_can_go_into_a_TS">Chicago 2013</a> and
<a href="http://wiki.edg.com/twiki/bin/view/Wg21issaquah/ChangesToExistingInTS">Issaquah 2014</a> meetings.</cxx-ednote>
<p>Since the extensions described in this technical specification
are experimental and not part of the C++ standard library, they
should not be declared directly within namespace
<code>std</code>.
Unless otherwise specified, all components described in this technical specification either:
</p>
<ul>
<li>modify an existing interface in the C++ Standard Library in-place,</li>
<li>
are declared in a namespace whose name appends <code>::experimental::concurrency_v1</code>
to a namespace defined in the C++ Standard Library,
such as <code>std</code>, or
</li>
<li>
are declared in a subnamespace of a namespace described in the previous bullet,
whose name is not the same as an existing subnamespace of namespace <code>std</code>.
</li>
</ul>
<p>Each header described in this technical
specification shall import the contents of
<code>std::experimental::concurrency_v1</code> into
<code>std::experimental</code> as if by</p>
<pre><code>namespace std {
namespace experimental {
inline namespace concurrency_v1 {}
}
}</code></pre>
<p>Unless otherwise specified, references to other entities
described in this technical specification are assumed to be
qualified with <code>std::experimental::concurrency_v1::</code>,
and references to entities described in the standard are assumed
to be qualified with <code>std::</code>.</p>
<p>Extensions that are expected to eventually be added to an
existing header <code><meow></code> are provided inside the
<code><experimental/meow></code> header, which shall include
the standard contents of <code><meow></code> as if by</p>
<pre><code>#include <meow></code></pre>
<p>New headers are also provided in the
<code><experimental/></code> directory, but without such an
<code>#include</code>.</p>
<table is="cxx-table" id="tab.cxx.headers" class="list" columns="3">
<caption>C++ library headers</caption>
<tr><td>
<ul>
<li><code><experimental/future></code></li>
<li><code><experimental/latch></code></li>
<li><code><experimental/barrier></code></li>
<li><code><experimental/atomic></code></li>
</ul>
</td></tr>
</table>
</cxx-section>
<cxx-section id="general.plans">
<h1>Future plans (Informative)</h1>
<p>This section describes tentative plans for future versions of
this technical specification and plans for moving content into
future versions of the C++ Standard.</p>
<p>The C++ committee intends to release a new version of this
technical specification approximately every year, containing the
library extensions we hope to add to a near-future version of the
C++ Standard. Future versions will define their contents in
<code>std::experimental::concurrency_v2</code>,
<code>std::experimental::concurrency_v3</code>, etc., with the
most recent implemented version inlined into
<code>std::experimental</code>.</p>
<p>When an extension defined in this or a future version of this
technical specification represents enough existing practice, it
will be moved into the next version of the C++ Standard by
removing the <code>experimental::concurrency_v<var>N</var></code>
segment of its namespace and by removing the
<code>experimental/</code> prefix from its header's path.</p>
</cxx-section>
<cxx-section id="general.feature.test">
<h1>Feature-testing recommendations (Informative)</h1>
<p>
For the sake of improved portability between partial implementations of various C++ standards,
WG21 (the ISO technical committee for the C++ programming language) recommends
that implementers and programmers follow the guidelines in this section concerning feature-test macros.
<cxx-note><a href="http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations">WG21's SD-6</a> makes similar recommendations for the C++ Standard itself.</cxx-note>
</p>
<p>
Implementers who provide a new standard feature should define a macro with the recommended name,
in the same circumstances under which the feature is available (for example, taking into account relevant command-line options),
to indicate the presence of support for that feature.
Implementers should define that macro with the value specified in
the most recent version of this technical specification that they have implemented.
The recommended macro name is "<code>__cpp_lib_experimental_</code>" followed by the string in the "Macro Name Suffix" column.
</p>
<p>
Programmers who wish to determine whether a feature is available in an implementation should base that determination on
the presence of the header (determined with <code>__has_include(<header/name>)</code>) and
the state of the macro with the recommended name.
(The absence of a tested feature may result in a program with decreased functionality, or the relevant functionality may be provided in a different way.
A program that strictly depends on support for a feature can just try to use the feature unconditionally;
presumably, on an implementation lacking necessary support, translation will fail.)
</p>
<table is="cxx-table" class="column-rules">
<caption>Significant features in this technical specification</caption>
<thead>
<tr>
<th>Doc. No.</th>
<th>Title</th>
<th>Primary Section</th>
<th>Macro Name Suffix</th>
<th>Value</th>
<th>Header</th>
</tr>
</thead>
<!-- These rows are in the same order as their feature appears in this document. -->
<tr>
<td>N4399</td>
<td>Improvements to std::future<T> and Related APIs</td>
<td><cxx-ref to="futures"></cxx-ref></td>
<td><code>future_continuations</code></td>
<td>201505</td>
<td><code><experimental/future></code></td>
</tr>
<tr>
<td>N4204</td>
<td>C++ Latches and Barriers</td>
<td><cxx-ref to="coordination"></cxx-ref></td>
<td><code>latch</code></td>
<td>201505</td>
<td><code><experimental/latch></code></td>
</tr>
<tr>
<td>N4204</td>
<td>C++ Latches and Barriers</td>
<td><cxx-ref to="coordination"></cxx-ref></td>
<td><code>barrier</code></td>
<td>201505</td>
<td><code><experimental/barrier></code></td>
</tr>
<tr>
<td>N4260</td>
<td>Atomic Smart Pointers</td>
<td><cxx-ref to="atomic"></cxx-ref></td>
<td><code>atomic_smart_pointers</code></td>
<td>201505</td>
<td><code><experimental/atomic></code></td>
</tr>
</table>
</cxx-section>
</cxx-clause>
<cxx-include href="future.html"></cxx-include>
<cxx-include href="latch_barrier.html"></cxx-include>
<cxx-include href="atomic_smart_ptr.html"></cxx-include>
<cxx-publish-button source="https://github.com/cplusplus/concurrent-ts"></cxx-publish-button>
</body>
</html>