Skip to content

Commit 2fbe76a

Browse files
committed
Merge pull request #20 from cplusplus/revert-17-master
Revert "Apply changes to N4071 in preparation for post-Rapperswil mailin...
2 parents f44551f + 953c1b1 commit 2fbe76a

File tree

7 files changed

+928
-512
lines changed

7 files changed

+928
-512
lines changed

algorithms.html

Lines changed: 248 additions & 136 deletions
Large diffs are not rendered by default.

exceptions.html

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,26 @@ <h1>Parallel exceptions</h1>
33
<cxx-section id="parallel.exceptions.behavior">
44
<h1>Exception reporting behavior</h1>
55
<p>
6-
During the execution of a standard parallel algorithm,
7-
if temporary memory resources are required and none are available,
6+
<ins2>During the execution of a standard parallel algorithm, </ins2>
7+
<del2>I</del2><ins2>i</ins2>f temporary memory resources are required <del2>by the algorithm</del2> and none are available,
88
the algorithm throws a <code>std::bad_alloc</code> exception.
99
</p>
1010
<p>
11-
During the execution of a standard parallel algorithm, if the <del>application of a function
12-
object</del><ins>invocation of an element access function</ins> terminates with an uncaught
13-
exception, the behavior of the program is determined by the type of execution policy used to
14-
invoke the algorithm:
11+
During the execution of a standard parallel algorithm, if the application of a function
12+
object terminates with an uncaught exception, the behavior of the program is determined
13+
by the type of execution policy used to invoke the algorithm:
1514

1615
<ul>
1716
<li>
18-
If the execution policy object is of type <code>class parallel_vector_execution_policy</code>,
17+
If the execution policy object is of type <code>class <del2>vector_execution_policy</del2><ins2>parallel_vector_execution_policy</ins2></code>,
1918
<code>std::terminate</code> shall be called.
2019
</li>
2120
<li>
2221
If the execution policy object is of type <code>sequential_execution_policy</code> or
2322
<code>parallel_execution_policy</code>, the execution of the algorithm terminates with an
2423
<code>exception_list</code> exception. All uncaught exceptions thrown during
25-
the <del>application of user-provided function objects</del><ins>invocations of element access functions</ins>
26-
shall be contained in the <code>exception_list</code>.<pre>
24+
the application of user-provided function objects shall be contained in the
25+
<code>exception_list</code>.<pre>
2726
</pre>
2827

2928
<cxx-note>
@@ -60,28 +59,41 @@ <h1>Header <code>&lt;experimental/exception_list&gt;</code> synopsis</h1>
6059
namespace std {
6160
namespace experimental {
6261
namespace parallel {
63-
inline namespace v1 {
62+
<ins2>inline namespace v1 {</ins2>
6463

6564
class exception_list : public exception
6665
{
6766
public:
68-
typedef <em>unspecified</em> iterator;
67+
<del2>
68+
typedef exception_ptr value_type;
69+
typedef const value_type&amp; reference;
70+
typedef const value_type&amp; const_reference;
71+
typedef <em>implementation-defined</em> const_iterator;
72+
typedef const_iterator iterator;
73+
typedef typename iterator_traits<ins2>&lt;const_iterator&gt;</ins2>::difference_type difference_type;
74+
typedef size_t size_type;</del2>
75+
<ins2>
76+
typedef <em>unspecified</em> iterator;</ins2>
6977

7078
size_t size() const noexcept;
7179
iterator begin() const noexcept;
7280
iterator end() const noexcept;
7381

74-
const char* what() const override noexcept;
82+
<ins2>const char* what() const noexcept override;</ins2>
83+
<del2>
84+
private:
85+
std::list&lt;exception_ptr&gt; exceptions_; // exposition only
86+
</del2>
7587
};
76-
}
88+
<ins2>}</ins2>
7789
}
7890
}
7991
}
8092
</pre>
8193

8294
<p>
83-
The class <code>exception_list</code> owns a sequence of <code>exception_ptr</code> objects. The parallel
84-
algorithms may use the <code>exception_list</code> to communicate uncaught exceptions encountered during parallel execution to the
95+
The class <code>exception_list</code> <del2>is a container</del2> <ins2>owns a sequence</ins2> of <code>exception_ptr</code> objects <ins2>.The</ins2> parallel
96+
algorithms may use <ins2>the <code>exception_list</code></ins2> to communicate uncaught exceptions encountered during parallel execution to the
8597
caller of the algorithm.
8698
</p>
8799

@@ -106,7 +118,7 @@ <h1>Header <code>&lt;experimental/exception_list&gt;</code> synopsis</h1>
106118

107119
<cxx-function>
108120
<cxx-signature>
109-
iterator begin() const noexcept;
121+
<del2>exception_list::</del2>iterator begin() const noexcept;
110122
</cxx-signature>
111123

112124
<cxx-returns>
@@ -116,21 +128,21 @@ <h1>Header <code>&lt;experimental/exception_list&gt;</code> synopsis</h1>
116128

117129
<cxx-function>
118130
<cxx-signature>
119-
iterator end() const noexcept;
131+
<del2>exception_list::</del2>iterator end() const noexcept;
120132
</cxx-signature>
121133

122134
<cxx-returns>
123-
An iterator that is past the end of the owned sequence.
135+
An iterator <del2>which is the past-the-end value for the <code>exception_list</code></del2> <ins2>that is past the end of the owned sequence.</ins2>
124136
</cxx-returns>
125137
</cxx-function>
126138

127139
<cxx-function>
128140
<cxx-signature>
129-
const char* what() const noexcept override;
141+
<ins2>const char* what() const noexcept override;</ins2>
130142
</cxx-signature>
131143

132144
<cxx-returns>
133-
An implementation-defined NTBS.
145+
<ins2>An implementation-defined NTBS.</ins2>
134146
</cxx-returns>
135147
</cxx-function>
136148
</cxx-section>

0 commit comments

Comments
 (0)