Skip to content

Commit 257cf30

Browse files
committed
Apply N4274
1 parent 1b22ab2 commit 257cf30

File tree

4 files changed

+52
-34
lines changed

4 files changed

+52
-34
lines changed

exceptions.html

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ <h1>Exception reporting behavior</h1>
99
</p>
1010
<p>
1111
During the execution of a standard parallel algorithm, if the invocation of an element access function
12-
terminates with an uncaught exception, the behavior of the program is determined by the type of
12+
<ins>exits via</ins><del>terminates with</del> an uncaught exception, the behavior of the program is determined by the type of
1313
execution policy used to invoke the algorithm:
1414

1515
<ul>
@@ -19,29 +19,30 @@ <h1>Exception reporting behavior</h1>
1919
</li>
2020
<li>
2121
If the execution policy object is of type <code>sequential_execution_policy</code> or
22-
<code>parallel_execution_policy</code>, the execution of the algorithm terminates with an
23-
<code>exception_list</code> exception. All uncaught exceptions thrown during
24-
the invocations of element access functions shall be contained in the
25-
<code>exception_list</code>.<pre>
22+
<code>parallel_execution_policy</code>, the execution of the algorithm <ins>exits via</ins><del>terminates with</del> an
23+
<del><code>exception_list</code></del> exception. <ins>The exception shall be an <code>exception_list</code> containing all</ins><del>All</del> uncaught exceptions thrown during
24+
the invocations of element access functions<ins>, or optionally the uncaught exception if there was only one</ins><del>shall be contained in the
25+
<code>exception_list</code></del>.<pre>
2626
</pre>
2727

2828
<cxx-note>
29-
For example, the number of invocations of the user-provided function object in
30-
<code>for_each</code> is unspecified. When <code>for_each</code> is executed sequentially,
31-
only one exception will be contained in the <code>exception_list</code> object.
29+
For example, <del>the number of invocations of the user-provided function object in
30+
<code>for_each</code> is unspecified. W</del><ins>w</ins>hen <code>for_each</code> is executed sequentially,
31+
<ins>if an invocation of the user-provided function object throws an exception, <code>for_each</code> can exit via the uncaught exception, or throw an <code>exception_list</code> containing the original exception.
32+
<del>only one exception will be contained in the <code>exception_list</code> object.</del>
3233
</cxx-note><pre>
3334
</pre>
3435

3536
<cxx-note>
3637
These guarantees imply that, unless the algorithm has failed to allocate memory and
37-
terminated with <code>std::bad_alloc</code>, all exceptions thrown during the execution of
38+
<ins>exits via</ins><del>terminated with</del> <code>std::bad_alloc</code>, all exceptions thrown during the execution of
3839
the algorithm are communicated to the caller. It is unspecified whether an algorithm implementation will "forge ahead" after
3940
encountering and capturing a user exception.
4041
</cxx-note><pre>
4142
</pre>
4243
<cxx-note>
43-
The algorithm may terminate with the <code>std::bad_alloc</code> exception even if one or more
44-
user-provided function objects have terminated with an exception. For example, this can happen when an algorithm fails to allocate memory while
44+
The algorithm may <ins>exit via</ins><del>terminate with</del> the <code>std::bad_alloc</code> exception even if one or more
45+
user-provided function objects have <ins>exited via</ins><del>terminated with</del> an exception. For example, this can happen when an algorithm fails to allocate memory while
4546
creating or adding elements to the <code>exception_list</code> object.
4647
</cxx-note>
4748
</li>

general.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,14 @@ <h1>Terms and definitions</h1>
9393
<li>
9494
User-provided function objects to be applied during the execution of the algorithm, if required by the specification.
9595
</li>
96+
97+
<ins><li>
98+
Operations on those function objects required by the specification.
99+
100+
<cxx-note>
101+
See clause 25.1 of <em>C++ Standard Algorithms Library</em>.
102+
</cxx-note>
103+
</li></ins>
96104
</ul>
97105

98106
These functions are herein called <em>element access functions</em>.

parallelism-ts.html

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
font-weight: bold; margin-top: 20px; margin-bottom: 20px; page-break-inside: avoid; page-break-after: avoid;
227227
}
228228

229-
cxx-section header:after {
229+
cxx-section header::after {
230230
clear: both; display: block; content: " "; height: 0px;
231231
}cxx-clause {
232232
display: block;
@@ -248,7 +248,7 @@
248248
font-weight: bold; margin-top: 20px; margin-bottom: 20px; page-break-inside: avoid; page-break-after: avoid;
249249
}
250250

251-
cxx-clause header:after {
251+
cxx-clause header::after {
252252
clear: both; display: block; content: " "; height: 0px;
253253
}[is=cxx-table] {
254254
margin-left: auto; margin-right: auto; border-collapse: collapse; border: thin solid black;
@@ -290,7 +290,7 @@
290290
padding-left: 0px; margin: 0px;
291291
}
292292

293-
[is=cxx-table].list ul li:before {
293+
[is=cxx-table].list ul li::before {
294294
content: "";
295295
}cxx-figure {
296296
margin-left: auto; margin-right: auto;
@@ -556,7 +556,7 @@
556556
white-space: normal;
557557
}
558558

559-
w-br:after {
559+
w-br::after {
560560
content: "​";
561561
}</style>
562562
<meta charset="utf-8">
@@ -712,13 +712,13 @@
712712
<div class="page">
713713
<table class="header">
714714

715-
<tbody><tr><th>Document Number:</th><td><cxx-docnum>N4407</cxx-docnum></td></tr>
715+
<tbody><tr><th>Document Number:</th><td><cxx-docnum>D4505</cxx-docnum></td></tr>
716716

717717

718-
<tr><th>Date:</th><td><time pubdate="">2015-04-10</time></td></tr>
718+
<tr><th>Date:</th><td><time pubdate="">2015-05-05</time></td></tr>
719719

720720

721-
<tr><th>Revises:</th><td><cxx-revises><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4352.html">N4352</a></cxx-revises></td></tr>
721+
<tr><th>Revises:</th><td><cxx-revises><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4407.html">N4407</a></cxx-revises></td></tr>
722722

723723

724724
<tr><th>Editor:</th><td><cxx-editor>
@@ -1063,6 +1063,17 @@ <h1>Contents</h1>
10631063
User-provided function objects to be applied during the
10641064
execution of the algorithm, if required by the specification.
10651065
</li>
1066+
1067+
<ins><li>
1068+
Operations on those function objects required by the specification.
1069+
1070+
<cxx-note><span class="nowrap">[ <em>Note:</em></span>
1071+
1072+
See clause 25.1 of <em>C++ Standard Algorithms Library</em>.
1073+
1074+
<span class="nowrap"><em>end note</em> ]</span>
1075+
</cxx-note>
1076+
</li></ins>
10661077
</ul>
10671078

10681079
These functions are herein called <em>element access functions</em>.
@@ -1492,7 +1503,7 @@ <h1>Contents</h1>
14921503
</p>
14931504
<p para_num="2" id="parallel.exceptions.behavior.2">
14941505
During the execution of a standard parallel algorithm, if the invocation of an element access function
1495-
terminates with an uncaught exception, the behavior of the program is determined by the type of
1506+
<ins>exits via</ins><del>terminates with</del> an uncaught exception, the behavior of the program is determined by the type of
14961507
execution policy used to invoke the algorithm:
14971508

14981509
</p><ul>
@@ -1502,25 +1513,26 @@ <h1>Contents</h1>
15021513
</li>
15031514
<li>
15041515
If the execution policy object is of type <code>sequential_execution_policy</code> or
1505-
<code>parallel_execution_policy</code>, the execution of the algorithm terminates with an
1506-
<code>exception_list</code> exception. All uncaught exceptions thrown during
1507-
the invocations of element access functions shall be contained in the
1508-
<code>exception_list</code>.<pre></pre>
1516+
<code>parallel_execution_policy</code>, the execution of the algorithm <ins>exits via</ins><del>terminates with</del> an
1517+
<del><code>exception_list</code></del> exception. <ins>The exception shall be an <code>exception_list</code> containing all</ins><del>All</del> uncaught exceptions thrown during
1518+
the invocations of element access functions<ins>, or optionally the uncaught exception if there was only one</ins><del>shall be contained in the
1519+
<code>exception_list</code></del>.<pre></pre>
15091520

15101521
<cxx-note><span class="nowrap">[ <em>Note:</em></span>
15111522

1512-
For example, the number of invocations of the user-provided function object in
1513-
<code>for_each</code> is unspecified. When <code>for_each</code> is executed sequentially,
1514-
only one exception will be contained in the <code>exception_list</code> object.
1515-
1523+
For example, <del>the number of invocations of the user-provided function object in
1524+
<code>for_each</code> is unspecified. W</del><ins>w</ins>hen <code>for_each</code> is executed sequentially,
1525+
<ins>if an invocation of the user-provided function object throws an exception, <code>for_each</code> can exit via the uncaught exception, or throw an <code>exception_list</code> containing the original exception.
1526+
<del>only one exception will be contained in the <code>exception_list</code> object.</del>
1527+
</ins>
15161528
<span class="nowrap"><em>end note</em> ]</span>
15171529
</cxx-note><pre></pre>
15181530

15191531
<cxx-note><span class="nowrap">[ <em>Note:</em></span>
15201532

15211533
These guarantees imply that, unless the algorithm has failed to allocate memory and
1522-
terminated with <code>std::bad_alloc</code>, all
1523-
exceptions thrown during the execution of
1534+
<ins>exits via</ins><del>terminated with</del> <code>std::bad_alloc</code>,
1535+
all exceptions thrown during the execution of
15241536
the algorithm are communicated to the caller. It is
15251537
unspecified whether an algorithm implementation will "forge ahead" after
15261538

@@ -1530,11 +1542,8 @@ <h1>Contents</h1>
15301542
</cxx-note><pre></pre>
15311543
<cxx-note><span class="nowrap">[ <em>Note:</em></span>
15321544

1533-
The algorithm may terminate with the <code>std::bad_alloc</code>
1534-
exception even if one or more
1535-
user-provided function objects have terminated with an
1536-
exception. For example, this can happen when an algorithm fails to
1537-
allocate memory while
1545+
The algorithm may <ins>exit via</ins><del>terminate with</del> the <code>std::bad_alloc</code> exception even if one or more
1546+
user-provided function objects have <ins>exited via</ins><del>terminated with</del> an exception. For example, this can happen when an algorithm fails to allocate memory while
15381547
creating or adding elements to the <code>exception_list</code> object.
15391548

15401549
<span class="nowrap"><em>end note</em> ]</span>

parallelism-ts.pdf

68.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)