Skip to content

Commit a4bafb7

Browse files
committed
Revised wording from Ville (Part II)
1 parent c09ec91 commit a4bafb7

File tree

1 file changed

+82
-8
lines changed

1 file changed

+82
-8
lines changed

xml/issue2510.xml

Lines changed: 82 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -230,26 +230,100 @@ extern const nothrow_t nothrow;
230230
[…]
231231
// <i>20.3.5, pair piecewise construction</i>
232232
struct piecewise_construct_t { <ins>explicit piecewise_construct_t() = default;</ins> };
233-
constexpr piecewise_construct_t piecewise_construct{ <ins><i>unspecified</i></ins> };
233+
constexpr piecewise_construct_t piecewise_construct{};
234+
[&hellip;]
235+
</pre></blockquote>
236+
</li>
237+
238+
<li><p>In <sref ref="[pairs.pair]"/>, change the class template <tt>pair</tt> synopsis:</p>
239+
240+
<blockquote><pre>
241+
[&hellip;]
242+
pair(pair&amp;&amp;) = default;
243+
<ins><i>EXPLICIT</i></ins> constexpr pair();
244+
<i>EXPLICIT</i> constexpr pair(const T1&amp; x, const T2&amp; y);
234245
[&hellip;]
235246
</pre></blockquote>
236247
</li>
237248

249+
<li><p>Around <sref ref="[pairs.pair]"/> p3, apply the following edits:</p>
250+
251+
<blockquote>
252+
<pre>
253+
<ins><i>EXPLICIT</i></ins> constexpr pair();
254+
</pre>
255+
<blockquote>
256+
<p>
257+
-3- <i>Effects</i>: Value-initializes <tt>first</tt> and <tt>second</tt>.
258+
<p/>
259+
-4- <i>Remarks</i>: This constructor shall not participate in overload resolution unless
260+
<tt>is_default_constructible&lt;first_type&gt;::value</tt> is <tt>true</tt> and
261+
<tt>is_default_constructible&lt;second_type&gt;::value</tt> is <tt>true</tt>.
262+
[<i>Note</i>: This
263+
behaviour can be implemented by a constructor template with default template arguments. &mdash;
264+
<i>end note</i>]
265+
<ins>The constructor is explicit if and only if either <tt>first_type</tt> or <tt>second_type</tt>
266+
is not implicitly default-constructible.
267+
[<i>Note</i>: This behaviour can be implemented with a trait
268+
that checks whether a <tt>const first_type&amp;</tt> or a <tt>const second_type&amp;</tt> can be
269+
initialized with <tt>{}</tt>. &mdash; <i>end note</i>]</ins>
270+
</p>
271+
</blockquote>
272+
</blockquote>
273+
</li>
274+
238275
<li><p>In <sref ref="[pair.piecewise]"/>, apply the following edits:</p>
239276

240277
<blockquote><pre>
241278
struct piecewise_construct_t { <ins>explicit piecewise_construct_t() = default;</ins> };
242-
constexpr piecewise_construct_t piecewise_construct{ <ins><i>unspecified</i></ins> };
279+
constexpr piecewise_construct_t piecewise_construct{};
280+
</pre></blockquote>
281+
</li>
282+
283+
<li><p>In <sref ref="[tuple.tuple]"/>, change the class template <tt>tuple</tt> synopsis:</p>
284+
285+
<blockquote><pre>
286+
[&hellip;]
287+
<i>// 20.4.2.1, tuple construction</i>
288+
<ins><i>EXPLICIT</i></ins> constexpr tuple();
289+
<i>EXPLICIT</i> constexpr tuple(const Types&amp;...); <i>// only if sizeof...(Types) &gt;= 1</i>
290+
[&hellip;]
243291
</pre></blockquote>
244292
</li>
245293

294+
<li><p>Around <sref ref="[tuple.cnstr]"/> p4, apply the following edits:</p>
295+
296+
<blockquote>
297+
<pre>
298+
<ins><i>EXPLICIT</i></ins> constexpr tuple();
299+
</pre>
300+
<blockquote>
301+
<p>
302+
-4- <i>Effects</i>: Value initializes each element.
303+
<p/>
304+
-5- <i>Remarks</i>: This constructor shall not participate in overload resolution unless
305+
<tt>is_default_constructible&lt;<i>T<sub>i</sub></i>&gt;::value</tt> is <tt>true</tt> for all <i>i</i>.
306+
<ins>The constructor is explicit if and only if either <tt>first_type</tt> or <tt>second_type</tt>
307+
is not implicitly default-constructible.</ins>
308+
[<i>Note</i>: This
309+
behaviour can be implemented by a constructor template with default template arguments. &mdash;
310+
<i>end note</i>]
311+
<ins>The constructor is explicit if and only if any type <tt><i>T<sub>i</sub></i></tt> is not implicitly
312+
default-constructible.
313+
[<i>Note</i>: This behaviour can be implemented with a trait that checks whether
314+
a <tt>const Ti&amp;</tt> can be initialized with <tt>{}</tt>. &mdash; <i>end note</i>]</ins>
315+
</p>
316+
</blockquote>
317+
</blockquote>
318+
</li>
319+
246320
<li><p>In <sref ref="[memory.syn]"/>/1, change the header <tt>&lt;memory&gt;</tt> synopsis:</p>
247321

248322
<blockquote><pre>
249323
[&hellip;]
250324
// <i>20.7.6, allocator argument tag</i>
251325
struct allocator_arg_t { <ins>explicit allocator_arg_t() = default;</ins> };
252-
constexpr allocator_arg_t allocator_arg{ <ins><i>unspecified</i></ins> };
326+
constexpr allocator_arg_t allocator_arg{};
253327
[&hellip;]
254328
</pre></blockquote>
255329
</li>
@@ -259,7 +333,7 @@ constexpr allocator_arg_t allocator_arg{ <ins><i>unspecified</i></ins> };
259333
<blockquote><pre>
260334
namespace std {
261335
struct allocator_arg_t { <ins>explicit allocator_arg_t() = default;</ins> };
262-
constexpr allocator_arg_t allocator_arg{ <ins><i>unspecified</i></ins> };
336+
constexpr allocator_arg_t allocator_arg{};
263337
}
264338
</pre></blockquote>
265339
<blockquote class="note">
@@ -285,8 +359,8 @@ We should decide whether or not to write out the <tt>std</tt> namespace in such
285359
paragraphs. I would suggest not to write it out.
286360
</p>
287361
</blockquote>
288-
289362
</li>
363+
290364
<li><p>In <sref ref="[thread.mutex]"/>/1, change the header <tt>&lt;mutex&gt;</tt> synopsis:</p>
291365

292366
<blockquote><pre>
@@ -295,9 +369,9 @@ struct defer_lock_t { <ins>explicit defer_lock_t() = default;</ins> };
295369
struct try_to_lock_t { <ins>explicit try_to_lock_t() = default;</ins> };
296370
struct adopt_lock_t { <ins>explicit adopt_lock_t() = default;</ins> };
297371

298-
constexpr defer_lock_t defer_lock { <ins><i>unspecified </i></ins> };
299-
constexpr try_to_lock_t try_to_lock { <ins><i>unspecified </i></ins> };
300-
constexpr adopt_lock_t adopt_lock { <ins><i>unspecified </i></ins> };
372+
constexpr defer_lock_t defer_lock { };
373+
constexpr try_to_lock_t try_to_lock { };
374+
constexpr adopt_lock_t adopt_lock { };
301375
[&hellip;]
302376
</pre></blockquote>
303377
</li>

0 commit comments

Comments
 (0)