<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta charset="utf-8">
<title>P0935R0: Eradicating unnecessarily explicit default constructors from the standard library</title>
<style type="text/css">
  p {text-align:justify}
  li {text-align:justify}
  blockquote.note
  {
    background-color:#E0E0E0;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 1px;
    padding-bottom: 1px;
  }
  ins {background-color:#A0FFA0}
  del {background-color:#FFA0A0}
  table {border-collapse: collapse;}
</style>
</head>
<body>
<address align=right>
Document number: P0935R0 <br/>
Date: 2018-02-12 <br/>
Reply-to: Tim Song &lt;rs2740 at gmail dot com&gt; <br/>
Audience: LWG
</address>
<hr>
<h2>Eradicating unnecessarily explicit default constructors from the standard library</h2>
<p><b>Discussion:</b></p>
<p>
Explicit default constructors block copy-list-initialization from <tt>{}</tt>. This typically happens:
<ul>
<li> when a <tt>T</tt> object is initialized with <tt>= {}</tt>;</li>
<li> when a function returning a <tt>T</tt> returns <tt>{}</tt>;</li>
<li> when a function taking a <tt>T</tt> is given <tt>{}</tt> as the argument;</li>
<li> as a special case of the above, when a <tt>T</tt> object is assigned <tt>{}</tt>;</li>
<li> when no explicit initializer is supplied for a <tt>T</tt> element of an aggregate (and no default member initializer exists) (see 11.6.1 <a href="https://wg21.link/dcl.init.aggr">[dcl.init.aggr]</a> p5).
</ul>
</p>
<p>In other words, if <tt>T</tt> is a class type with an explicit default constructor, all of the following are ill-formed:
<blockquote><pre>
struct itpair { int i; T t; } x = { 0 };
itpair y{};    // not even using direct-list-initialization on the aggregate helps
itpair z = {};
T t = {};
t = {};        // assuming that T has a copy/move assignment operator that is selected by overload resolution
</pre></blockquote>
</p><p>
For most <tt>T</tt>s, this is quite surprising behavior and highly unlikely to be desirable. (There is currently <a href="https://github.com/ericniebler/stl2/issues/529">an open Ranges TS issue</a> asking whether <tt>DefaultConstructible</tt> should permit such types.) To take an example from the wording below, it seems reasonable to store a random number distribution as a member of an aggregate and implicitly initialize it if the default argument values are suitable, but we can't do this currently:
<blockquote><pre>
struct normrd {
    std::mt19937 engine;
    std::normal_distribution&lt;&gt; dist;
};
normrd standard_normal_dist = { make_seeded&lt;std::mt19937&gt() }; // error
</pre></blockquote>
</p><p>
Moreover, if the type at issue is a C++03 type, then this also presents a compatibility problem because in C++03 an aggregate member without an explicit initializer is value-initialized, which tolerates explicit default constructors just fine. For example, with the container adaptors:
<blockquote><pre>
struct tagged_queue {
    std::string tag;
    std::queue&lt;int&gt; queue;
};
tagged_queue q = { "queue1" }; // OK in C++03; error now
</pre></blockquote>
</p><p>
With the exception of the explicit default constructors intentionally introduced by LWG <a href="https://wg21.link/LWG2510">2510</a>, most explicit default constructors in the library appear to arise out of historical accident rather than intentional design: they are constructors taking one or more parameters, all of which have default arguments, and so the <tt>explicit</tt> was added to prevent defining an undesirable implicit conversion from the type of the first parameter. At the time of their design, <tt>explicit</tt> simply had no effect in the other cases. It is also worth noting that the vast majority of them (container adaptors, random number engines, certain random number distributions, string streams) all have analogs with non-explicit default constructors (containers, random number engine adaptors, sampling distributions, file streams).
</p><p>
We should not use explicit default constructors without a good reason, at least for classes that can conceivably be used in a copy-list-initialization context. LWG <a href="https://wg21.link/LWG2193">2193</a> eliminated a number of such constructors for types with initializer-list constructors. The proposed wording below finishes the job.
</p><p>
Note that this paper intentionally does not cover or propose changes on the explicitness of constructors taking &gt;1 parameters. That more difficult question is covered by LWG <a href="https://wg21.link/LWG2307">2307</a>.
</p>
<p><b>Proposed wording:</b></p>
<p>This wording is relative to <a href="http://wg21.link/n4713">N4713</a>.
<p/>
<blockquote class="note">
[<i>Drafting note</i>: All facets have explicit default constructors, but they also have protected destructors and so can't normally be constructed in one of the contexts noted above. Even ignoring the access issue, a default-constructed facet is meant to be <tt>delete</tt>d by the locale, and <tt>new</tt> is always direct-initialization. Thus, no change is proposed for them. &mdash; <i>end drafting note</i>]
</blockquote>
<p/>
<blockquote class="note">
[<i>Drafting note</i>: <tt>scoped_lock&lt;&gt;</tt> has an explicit default constructor in the empty pack case, but I can't think of a reason why one would use it in non-generic code, and in generic code direct-initialization is required anyway. Thus no change to it is proposed. &mdash; <i>end drafting note</i>]
</blockquote>
</p>
<ol>
<li><p>Edit 26.6.4.1 <a href="https://wg21.link/queue.defn">[queue.defn]</a>, class template <tt>queue</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]

  public:
<ins>    queue() : queue(Container()) {}</ins>
    explicit queue(const Container&amp;);
    explicit queue(Container&amp;&amp;<del> = Container()</del>);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 26.6.4.2 <a href="https://wg21.link/queue.cons">[queue.cons]</a> before p2 as indicated:</p>
<blockquote>
<pre>
explicit queue(Container&amp;&amp; cont<del> = Container()</del>);
</pre>
<blockquote>
<p>
-2- <i>Effects:</i>  Initializes <tt>c</tt> with <tt>std​::​move(cont)</tt>.
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 26.6.5 <a href="https://wg21.link/priority.queue">[priority.queue]</a>, class template <tt>priority_queue</tt> synopsis, as indicated:</p>
<blockquote class="note">
[<i>Drafting note</i>: This contains a drive-by fix that makes the two-parameter rvalue-<tt>Container</tt> constructor non-explicit, to match the two-parameter const lvalue-<tt>Container</tt> constructor. Regardless of what one might think about the merits of <tt>explicit</tt> on the two-parameter form, it seems nonsensical for it to turn on the value category of one of the arguments. &mdash; <i>end drafting note</i>]
</blockquote>
<blockquote>
<pre>
  [&hellip;]

  public:
<ins>    priority_queue() : priority_queue(Compare()) {}</ins>
<ins>    explicit priority_queue(const Compare&amp; x) : priority_queue(x, Container()) {}</ins>
    priority_queue(const Compare&amp; x, const Container&amp;);
    <del>explicit </del>priority_queue(const Compare&amp; x<del> = Compare()</del>, Container&amp;&amp;<del>= Container()</del>);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 26.6.5.1 <a href="https://wg21.link/priqueue.cons">[priqueue.cons]</a> before p1 as indicated:</p>
<blockquote>
<pre>
priority_queue(const Compare&amp; x, const Container&amp; y);
<del>explicit </del>priority_queue(const Compare&amp; x<del> = Compare()</del>, Container&amp;&amp; y<del> = Container()</del>);
</pre>
<blockquote>
<p>
-1- <i>Requires:</i> [&hellip;]
<p/>
-2- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 26.6.6.1 <a href="https://wg21.link/stack.defn">[stack.defn]</a>, class template <tt>stack</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]

  public:
<ins>    stack() : stack(Container()) {}</ins>
    explicit stack(const Container&amp;);
    explicit stack(Container&amp;&amp;<del> = Container()</del>);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 26.6.6.2 <a href="https://wg21.link/stack.cons">[stack.cons]</a> before p2 as indicated:</p>
<blockquote>
<pre>
explicit stack(Container&amp;&amp; cont<del> = Container()</del>);
</pre>
<blockquote>
<p>
-2- <i>Effects:</i>  Initializes <tt>c</tt> with <tt>std​::​move(cont)</tt>.
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.3.1 <a href="https://wg21.link/rand.eng.lcong">[rand.eng.lcong]</a> after p1, class template <tt>linear_congruential_engine</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and seeding functions
<ins>    linear_congruential_engine() : linear_congruential_engine(default_seed) {} </ins>
    explicit linear_congruential_engine(result_type s<del> = default_seed</del>);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.3.1 <a href="https://wg21.link/rand.eng.lcong">[rand.eng.lcong]</a> before p5 as indicated:</p>
<blockquote>
<pre>
explicit linear_congruential_engine(result_type s<del> = default_seed</del>);
</pre>
<blockquote>
<p>
-5- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.3.2 <a href="https://wg21.link/rand.eng.mers">[rand.eng.mers]</a> after p3, class template <tt>mersenne_twister_engine</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and seeding functions
<ins>    mersenne_twister_engine() : mersenne_twister_engine(default_seed) {} </ins>
    explicit mersenne_twister_engine(result_type s<del> = default_seed</del>);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.3.2 <a href="https://wg21.link/rand.eng.mers">[rand.eng.mers]</a> before p6 as indicated:</p>
<blockquote>
<pre>
explicit mersenne_twister_engine(result_type s<del> = default_seed</del>);
</pre>
<blockquote>
<p>
-6- <i>Effects:</i> [&hellip;]
<p/>
-7- <i>Complexity:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.3.3 <a href="https://wg21.link/rand.eng.sub">[rand.eng.sub]</a> after p4, class template <tt>subtract_with_carry_engine</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and seeding functions
<ins>    subtract_with_carry_engine() : subtract_with_carry_engine(default_seed) {} </ins>
    explicit subtract_with_carry_engine(result_type s<del> = default_seed</del>);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.3.3 <a href="https://wg21.link/rand.eng.sub">[rand.eng.sub]</a> before p7 as indicated:</p>
<blockquote>
<pre>
explicit subtract_with_carry_engine(result_type s<del> = default_seed</del>);
</pre>
<blockquote>
<p>
-7- <i>Effects:</i> [&hellip;]
<p/>
-8- <i>Complexity:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.6 <a href="https://wg21.link/rand.device">[rand.device]</a> after p2, class <tt>random_device</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
  // constructors
<ins>  random_device() : random_device(<i>implementation-defined</i>) {}</ins>
  explicit random_device(const string&amp; token<del> = <i>implementation-defined</i></del>);
  
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.6 <a href="https://wg21.link/rand.device">[rand.device]</a> p3 as indicated:</p>
<blockquote>
<pre>
<ins>random_device() : random_device(<i>implementation-defined</i>) {}</ins>
explicit random_device(const string&amp; token<del> = <i>implementation-defined</i></del>);
</pre>
<blockquote>
<p>
-3- <i>Effects:</i> Constructs a <tt>random_device</tt> nondeterministic uniform random bit generator object. The semantics<del> and default value</del> of the <tt>token</tt> parameter<ins> and the token value used by the default constructor</ins> are implementation-defined. [<i>Footnote:</i>&hellip;]
<p/>
-4- <i>Throws:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.8.2.1 <a href="https://wg21.link/rand.dist.uni.int">[rand.dist.uni.int]</a> after p1, class template <tt>uniform_int_distribution</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and reset functions
<ins>    uniform_int_distribution() : uniform_int_distribution(0) {} </ins>
    explicit uniform_int_distribution(IntType a<del> = 0</del>, IntType b = numeric_limits&lt;IntType&gt;::max());
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.8.2.1 <a href="https://wg21.link/rand.dist.uni.int">[rand.dist.uni.int]</a> before p2 as indicated:</p>
<blockquote>
<pre>
explicit uniform_int_distribution(IntType a<del> = 0</del>, IntType b = numeric_limits&lt;IntType&gt;::max());
</pre>
<blockquote>
<p>
-2- <i>Requires:</i> [&hellip;]
<p/>
-3- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.8.2.2 <a href="https://wg21.link/rand.dist.uni.real">[rand.dist.uni.real]</a> after p1, class template <tt>uniform_real_distribution</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and reset functions
<ins>    uniform_real_distribution() : uniform_real_distribution(0.0) {} </ins>
    explicit uniform_real_distribution(RealType a<del> = 0.0</del>, RealType b = 1.0);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.8.2.2 <a href="https://wg21.link/rand.dist.uni.real">[rand.dist.uni.real]</a> before p2 as indicated:</p>
<blockquote>
<pre>
explicit uniform_real_distribution(RealType a<del> = 0.0</del>, RealType b = 1.0);
</pre>
<blockquote>
<p>
-2- <i>Requires:</i> [&hellip;]
<p/>
-3- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.8.3.1 <a href="https://wg21.link/rand.dist.bern.bernoulli">[rand.dist.bern.bernoulli]</a> after p1, class <tt>bernoulli_distribution</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and reset functions
<ins>    bernoulli_distribution() : bernoulli_distribution(0.5) {} </ins>
    explicit bernoulli_distribution(double p<del> = 0.5</del>);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.8.3.1 <a href="https://wg21.link/rand.dist.bern.bernoulli">[rand.dist.bern.bernoulli]</a> before p2 as indicated:</p>
<blockquote>
<pre>
explicit bernoulli_distribution(double p<del> = 0.5</del>);
</pre>
<blockquote>
<p>
-2- <i>Requires:</i> [&hellip;]
<p/>
-3- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.8.3.2 <a href="https://wg21.link/rand.dist.bern.bin">[rand.dist.bern.bin]</a> after p1, class template <tt>binomial_distribution</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and reset functions
<ins>    binomial_distribution() : binomial_distribution(1) {} </ins>
    explicit binomial_distribution(IntType t<del> = 1</del>, double p = 0.5);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.8.3.2 <a href="https://wg21.link/rand.dist.bern.bin">[rand.dist.bern.bin]</a> before p2 as indicated:</p>
<blockquote>
<pre>
explicit binomial_distribution(IntType t<del> = 1</del>, double p = 0.5);
</pre>
<blockquote>
<p>
-2- <i>Requires:</i> [&hellip;]
<p/>
-3- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.8.3.3 <a href="https://wg21.link/rand.dist.bern.geo">[rand.dist.bern.geo]</a> after p1, class template <tt>geometric_distribution</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and reset functions
<ins>    geometric_distribution() : geometric_distribution(0.5) {} </ins>
    explicit geometric_distribution(double p<del> = 0.5</del>);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.8.3.3 <a href="https://wg21.link/rand.dist.bern.geo">[rand.dist.bern.geo]</a> before p2 as indicated:</p>
<blockquote>
<pre>
explicit geometric_distribution(double p<del> = 0.5</del>);
</pre>
<blockquote>
<p>
-2- <i>Requires:</i> [&hellip;]
<p/>
-3- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.8.3.4 <a href="https://wg21.link/rand.dist.bern.negbin">[rand.dist.bern.negbin]</a> after p1, class template <tt>negative_binomial_distribution</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and reset functions
<ins>    negative_binomial_distribution() : negative_binomial_distribution(1) {} </ins>
    explicit negative_binomial_distribution(IntType k<del> = 1</del>, double p = 0.5);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.8.3.4 <a href="https://wg21.link/rand.dist.bern.negbin">[rand.dist.bern.negbin]</a> before p2 as indicated:</p>
<blockquote>
<pre>
explicit negative_binomial_distribution(IntType k<del> = 1</del>, double p = 0.5);
</pre>
<blockquote>
<p>
-2- <i>Requires:</i> [&hellip;]
<p/>
-3- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.8.4.1 <a href="https://wg21.link/rand.dist.pois.poisson">[rand.dist.pois.poisson]</a> after p1, class template <tt>poisson_distribution</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and reset functions
<ins>    poisson_distribution() : poisson_distribution(1.0) {} </ins>
    explicit poisson_distribution(double mean<del> = 1.0</del>);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.8.4.1 <a href="https://wg21.link/rand.dist.pois.poisson">[rand.dist.pois.poisson]</a> before p2 as indicated:</p>
<blockquote>
<pre>
explicit poisson_distribution(double mean<del> = 1.0</del>);
</pre>
<blockquote>
<p>
-2- <i>Requires:</i> [&hellip;]
<p/>
-3- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.8.4.2 <a href="https://wg21.link/rand.dist.pois.exp">[rand.dist.pois.exp]</a> after p1, class template <tt>exponential_distribution</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and reset functions
<ins>    exponential_distribution() : exponential_distribution(1.0) {} </ins>
    explicit exponential_distribution(RealType lambda<del> = 1.0</del>);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.8.4.2 <a href="https://wg21.link/rand.dist.pois.exp">[rand.dist.pois.exp]</a> before p2 as indicated:</p>
<blockquote>
<pre>
explicit exponential_distribution(RealType lambda<del> = 1.0</del>);
</pre>
<blockquote>
<p>
-2- <i>Requires:</i> [&hellip;]
<p/>
-3- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.8.4.3 <a href="https://wg21.link/rand.dist.pois.gamma">[rand.dist.pois.gamma]</a> after p1, class template <tt>gamma_distribution</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and reset functions
<ins>    gamma_distribution() : gamma_distribution(1.0) {} </ins>
    explicit gamma_distribution(RealType alpha<del> = 1.0</del>, RealType beta = 1.0);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.8.4.3 <a href="https://wg21.link/rand.dist.pois.gamma">[rand.dist.pois.gamma]</a> before p2 as indicated:</p>
<blockquote>
<pre>
explicit gamma_distribution(RealType alpha<del> = 1.0</del>, RealType beta = 1.0);
</pre>
<blockquote>
<p>
-2- <i>Requires:</i> [&hellip;]
<p/>
-3- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.8.4.4 <a href="https://wg21.link/rand.dist.pois.weibull">[rand.dist.pois.weibull]</a> after p1, class template <tt>weibull_distribution</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and reset functions
<ins>    weibull_distribution() : weibull_distribution(1.0) {} </ins>
    explicit weibull_distribution(RealType a<del> = 1.0</del>, RealType b = 1.0);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.8.4.4 <a href="https://wg21.link/rand.dist.pois.weibull">[rand.dist.pois.weibull]</a> before p2 as indicated:</p>
<blockquote>
<pre>
explicit weibull_distribution(RealType a<del> = 1.0</del>, RealType b = 1.0);
</pre>
<blockquote>
<p>
-2- <i>Requires:</i> [&hellip;]
<p/>
-3- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.8.4.5 <a href="https://wg21.link/rand.dist.pois.extreme">[rand.dist.pois.extreme]</a> after p1, class template <tt>extreme_value_distribution</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and reset functions
<ins>    extreme_value_distribution() : extreme_value_distribution(0.0) {} </ins>
    explicit extreme_value_distribution(RealType a<del> = 0.0</del>, RealType b = 1.0);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.8.4.5 <a href="https://wg21.link/rand.dist.pois.extreme">[rand.dist.pois.extreme]</a> before p2 as indicated:</p>
<blockquote>
<pre>
explicit extreme_value_distribution(RealType a<del> = 0.0</del>, RealType b = 1.0);
</pre>
<blockquote>
<p>
-2- <i>Requires:</i> [&hellip;]
<p/>
-3- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.8.5.1 <a href="https://wg21.link/rand.dist.norm.normal">[rand.dist.norm.normal]</a> after p1, class template <tt>normal_distribution</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and reset functions
<ins>    normal_distribution() : normal_distribution(0.0) {} </ins>
    explicit normal_distribution(RealType mean<del> = 0.0</del>, RealType stddev = 1.0);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.8.5.1 <a href="https://wg21.link/rand.dist.norm.normal">[rand.dist.norm.normal]</a> before p2 as indicated:</p>
<blockquote>
<pre>
explicit normal_distribution(RealType mean<del> = 0.0</del>, RealType stddev = 1.0);
</pre>
<blockquote>
<p>
-2- <i>Requires:</i> [&hellip;]
<p/>
-3- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.8.5.2 <a href="https://wg21.link/rand.dist.norm.lognormal">[rand.dist.norm.lognormal]</a> after p1, class template <tt>lognormal_distribution</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and reset functions
<ins>    lognormal_distribution() : lognormal_distribution(0.0) {} </ins>
    explicit lognormal_distribution(RealType m<del> = 0.0</del>, RealType s = 1.0);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.8.5.2 <a href="https://wg21.link/rand.dist.norm.lognormal">[rand.dist.norm.lognormal]</a> before p2 as indicated:</p>
<blockquote>
<pre>
explicit lognormal_distribution(RealType m<del> = 0.0</del>, RealType s = 1.0);
</pre>
<blockquote>
<p>
-2- <i>Requires:</i> [&hellip;]
<p/>
-3- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.8.5.3 <a href="https://wg21.link/rand.dist.norm.chisq">[rand.dist.norm.chisq]</a> after p1, class template <tt>chi_squared_distribution</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and reset functions
<ins>    chi_squared_distribution() : chi_squared_distribution(1) {} </ins>
    explicit chi_squared_distribution(RealType n<del> = 1</del>);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.8.5.3 <a href="https://wg21.link/rand.dist.norm.chisq">[rand.dist.norm.chisq]</a> before p2 as indicated:</p>
<blockquote>
<pre>
explicit chi_squared_distribution(RealType n<del> = 1</del>);
</pre>
<blockquote>
<p>
-2- <i>Requires:</i> [&hellip;]
<p/>
-3- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.8.5.4 <a href="https://wg21.link/rand.dist.norm.cauchy">[rand.dist.norm.cauchy]</a> after p1, class template <tt>cauchy_distribution</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and reset functions
<ins>    cauchy_distribution() : cauchy_distribution(0.0) {} </ins>
    explicit cauchy_distribution(RealType a<del> = 0.0</del>, RealType b = 1.0);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.8.5.4 <a href="https://wg21.link/rand.dist.norm.cauchy">[rand.dist.norm.cauchy]</a> before p2 as indicated:</p>
<blockquote>
<pre>
explicit cauchy_distribution(RealType a<del> = 0.0</del>, RealType b = 1.0);
</pre>
<blockquote>
<p>
-2- <i>Requires:</i> [&hellip;]
<p/>
-3- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>

<li><p>Edit 29.6.8.5.5 <a href="https://wg21.link/rand.dist.norm.f">[rand.dist.norm.f]</a> after p1, class template <tt>fisher_f_distribution</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and reset functions
<ins>    fisher_f_distribution() : fisher_f_distribution(1) {} </ins>
    explicit fisher_f_distribution(RealType m<del> = 1</del>, RealType n = 1);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.8.5.5 <a href="https://wg21.link/rand.dist.norm.f">[rand.dist.norm.f]</a> before p2 as indicated:</p>
<blockquote>
<pre>
explicit fisher_f_distribution(RealType m<del> = 1</del>, RealType n = 1);
</pre>
<blockquote>
<p>
-2- <i>Requires:</i> [&hellip;]
<p/>
-3- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 29.6.8.5.6 <a href="https://wg21.link/rand.dist.norm.t">[rand.dist.norm.t]</a> after p1, class template <tt>student_t_distribution</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // constructors and reset functions
<ins>    student_t_distribution() : student_t_distribution(1) {} </ins>
    explicit student_t_distribution(RealType n<del> = 1</del>);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 29.6.8.5.6 <a href="https://wg21.link/rand.dist.norm.t">[rand.dist.norm.t]</a> before p2 as indicated:</p>
<blockquote>
<pre>
explicit student_t_distribution(RealType n<del> = 1</del>);
</pre>
<blockquote>
<p>
-2- <i>Requires:</i> [&hellip;]
<p/>
-3- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 30.8.2 <a href="https://wg21.link/stringbuf">[stringbuf]</a>, class template <tt>basic_stringbuf</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // 30.8.2.1 <a href="https://wg21.link/stringbuf.cons">[stringbuf.cons]</a>, constructors
<ins>    basic_stringbuf() : basic_stringbuf(ios_base::in | ios_base::out) {}</ins>
    explicit basic_stringbuf(
      ios_base::openmode which<del> = ios_base::in | ios_base::out</del>);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 30.8.2.1 <a href="https://wg21.link/stringbuf.cons">[stringbuf.cons]</a> before p1 as indicated:</p>
<blockquote>
<pre>
explicit basic_stringbuf(
  ios_base::openmode which<del> = ios_base::in | ios_base::out</del>);
</pre>
<blockquote>
<p>
-1- <i>Effects:</i> [&hellip;]
<p/>
-2- <i>Postconditions:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 30.8.3 <a href="https://wg21.link/istringstream">[istringstream]</a>, class template <tt>basic_istringstream</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // 30.8.3.1 <a href="https://wg21.link/istringstream.cons">[istringstream.cons]</a>, constructors
<ins>    basic_istringstream() : basic_istringstream(ios_base::in) {}</ins>
    explicit basic_istringstream(
      ios_base::openmode which<del> = ios_base::in</del>);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 30.8.3.1 <a href="https://wg21.link/istringstream.cons">[istringstream.cons]</a> before p1 as indicated:</p>
<blockquote>
<pre>
explicit basic_istringstream(ios_base::openmode which<del> = ios_base::in</del>);
</pre>
<blockquote>
<p>
-1- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 30.8.4 <a href="https://wg21.link/ostringstream">[ostringstream]</a>, class template <tt>basic_ostringstream</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // 30.8.4.1 <a href="https://wg21.link/ostringstream.cons">[ostringstream.cons]</a>, constructors
<ins>    basic_ostringstream() : basic_ostringstream(ios_base::out) {}</ins>
    explicit basic_ostringstream(
      ios_base::openmode which<del> = ios_base::out</del>);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 30.8.4.1 <a href="https://wg21.link/ostringstream.cons">[ostringstream.cons]</a> before p1 as indicated:</p>
<blockquote>
<pre>
explicit basic_ostringstream(
  ios_base::openmode which<del> = ios_base::out</del>);
</pre>
<blockquote>
<p>
-1- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 30.8.5 <a href="https://wg21.link/stringstream">[stringstream]</a>, class template <tt>basic_stringstream</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
    // 30.8.5.1 <a href="https://wg21.link/stringstream.cons">[stringstream.cons]</a>, constructors
<ins>    basic_stringstream() : basic_stringstream(ios_base::out | ios_base::in) {}</ins>
    explicit basic_stringstream(
      ios_base::openmode which<del> = ios_base::out | ios_base::in</del>);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 30.8.5.1 <a href="https://wg21.link/stringstream.cons">[stringstream.cons]</a> before p1 as indicated:</p>
<blockquote>
<pre>
explicit basic_stringstream(
  ios_base::openmode which<del> = ios_base::out | ios_base::in</del>);
</pre>
<blockquote>
<p>
-1- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit 31.10 <a href="https://wg21.link/re.results">[re.results]</a> after p4, class template <tt>match_results</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
      // 31.10.1 <a href="https://wg21.link/re.results.const">[re.results.const]</a>, construct/copy/destroy
<ins>      match_results() : match_results(Allocator()) {}</ins>
      explicit match_results(const Allocator&amp; a<del> = Allocator()</del>);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit 31.10.1 <a href="https://wg21.link/re.results.const">[re.results.const]</a> before p1 as indicated:</p>
<blockquote class="note">
[<i>Drafting note</i>: This contains a drive-by editorial fix for a missing <tt>explicit</tt> in the constructor description. &mdash; <i>end drafting note</i>]
</blockquote>
<blockquote>
<pre>
<ins>explicit </ins>match_results(const Allocator&anp; a<del> = Allocator()</del>);
</pre>
<blockquote>
<p>
-1- <i>Effects:</i> [&hellip;]
<p/>
-2- <i>Postconditions:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit D.7.1 <a href="https://wg21.link/depr.strstreambuf">[depr.strstreambuf]</a>, class <tt>strstreambuf</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
<ins>    strstreambuf() : strstreambuf(0) {} </ins>
    explicit strstreambuf(streamsize alsize_arg<del> = 0</del>);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit D.7.1.1 <a href="https://wg21.link/depr.strstreambuf.cons">[depr.strstreambuf.cons]</a> before p1 as indicated:</p>
<blockquote>
<pre>
explicit strstreambuf(streamsize alsize_arg<del> = 0</del>);
</pre>
<blockquote>
<p>
-1- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit D.18.1 <a href="https://wg21.link/depr.conversions.string">[depr.conversions.string]</a> after p1, class template <tt>wstring_convert</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
<ins>      wstring_convert() : wstring_convert(new Codecvt) {} </ins>
      explicit wstring_convert(Codecvt* pcvt<del> = new Codecvt</del>);
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit D.18.1 <a href="https://wg21.link/depr.conversions.string">[depr.conversions.string]</a> before p16 as indicated:</p>
<blockquote>
<pre>
explicit wstring_convert(Codecvt* pcvt<del> = new Codecvt</del>);
wstring_convert(Codecvt* pcvt, state_type state);
explicit wstring_convert(const byte_string&amp; byte_err,
    const wide_string&amp; wide_err = wide_string());
</pre>
<blockquote>
<p>
-16- <i>Requires:</i> [&hellip;]
<p/>
-17- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>
<li><p>Edit D.18.2 <a href="https://wg21.link/depr.conversions.buffer">[depr.conversions.buffer]</a> after p1, class template <tt>wbuffer_convert</tt> synopsis, as indicated:</p>
<blockquote>
<pre>
  [&hellip;]
  
<ins>      wbuffer_convert() : wbuffer_convert(nullptr) {} </ins>
      explicit wbuffer_convert(streambuf* bytebuf<del> = nullptr</del>,
                               Codecvt* pcvt = new Codecvt,
                               state_type state = state_type());
  [&hellip;]
</pre>
</blockquote>
</li>
<li><p>Edit D.18.2 <a href="https://wg21.link/depr.conversions.buffer">[depr.conversions.buffer]</a> before p9 as indicated:</p>
<blockquote>
<pre>
explicit wbuffer_convert(
    streambuf* bytebuf<del> = nullptr</del>,
    Codecvt* pcvt = new Codecvt,
    state_type state = state_type());
</pre>
<blockquote>
<p>
-9- <i>Requires:</i> [&hellip;]
<p/>
-10- <i>Effects:</i> [&hellip;]
</p>
</blockquote>
</blockquote>
</li>

</ol>





</body>
</html>
