You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 functionsshall 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>
26
26
</pre>
27
27
28
28
<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>
32
33
</cxx-note><pre>
33
34
</pre>
34
35
35
36
<cxx-note>
36
37
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
38
39
the algorithm are communicated to the caller. It is unspecified whether an algorithm implementation will "forge ahead" after
39
40
encountering and capturing a user exception.
40
41
</cxx-note><pre>
41
42
</pre>
42
43
<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
45
46
creating or adding elements to the <code>exception_list</code> object.
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
1496
1507
execution policy used to invoke the algorithm:
1497
1508
1498
1509
</p><ul>
@@ -1502,25 +1513,26 @@ <h1>Contents</h1>
1502
1513
</li>
1503
1514
<li>
1504
1515
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 functionsshall 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
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>
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
1538
1547
creating or adding elements to the <code>exception_list</code> object.
0 commit comments