<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Issue 2181: Exceptions from seed sequence operations</title>
<meta property="og:title" content="Issue 2181: Exceptions from seed sequence operations">
<meta property="og:description" content="C++ library issue. Status: C++17">
<meta property="og:url" content="https://cplusplus.github.io/LWG/issue2181.html">
<meta property="og:type" content="website">
<meta property="og:image" content="http://cplusplus.github.io/LWG/images/cpp_logo.png">
<meta property="og:image:alt" content="C++ logo">
<style>
  p {text-align:justify}
  li {text-align:justify}
  pre code.backtick::before { content: "`" }
  pre code.backtick::after { content: "`" }
  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.issues-index { border: 1px solid; border-collapse: collapse; }
  table.issues-index th { text-align: center; padding: 4px; border: 1px solid; }
  table.issues-index td { padding: 4px; border: 1px solid; }
  table.issues-index td:nth-child(1) { text-align: right; }
  table.issues-index td:nth-child(2) { text-align: left; }
  table.issues-index td:nth-child(3) { text-align: left; }
  table.issues-index td:nth-child(4) { text-align: left; }
  table.issues-index td:nth-child(5) { text-align: center; }
  table.issues-index td:nth-child(6) { text-align: center; }
  table.issues-index td:nth-child(7) { text-align: left; }
  table.issues-index td:nth-child(5) span.no-pr { color: red; }
  @media (prefers-color-scheme: dark) {
     html {
        color: #ddd;
        background-color: black;
     }
     ins {
        background-color: #225522
     }
     del {
        background-color: #662222
     }
     a {
        color: #6af
     }
     a:visited {
        color: #6af
     }
     blockquote.note
     {
        background-color: rgba(255, 255, 255, .10)
     }
  }
</style>
</head>
<body>
<hr>
<p><em>This page is a snapshot from the LWG issues list, see the <a href="lwg-active.html">Library Active Issues List</a> for more information and the meaning of <a href="lwg-active.html#C++17">C++17</a> status.</em></p>
<h3 id="2181"><a href="lwg-defects.html#2181">2181</a>. Exceptions from <em>seed sequence</em> operations</h3>
<p><b>Section:</b> 29.5.3.2 <a href="https://wg21.link/rand.req.seedseq">[rand.req.seedseq]</a>, 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a>, 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a> <b>Status:</b> <a href="lwg-active.html#C++17">C++17</a>
 <b>Submitter:</b> Daniel Kr&uuml;gler <b>Opened:</b> 2012-08-18 <b>Last modified:</b> 2017-07-30</p>
<p><b>Priority: </b>3
</p>
<p><b>View all other</b> <a href="lwg-index.html#rand.req.seedseq">issues</a> in [rand.req.seedseq].</p>
<p><b>View all issues with</b> <a href="lwg-status.html#C++17">C++17</a> status.</p>
<p><b>Discussion:</b></p>

<p>
LWG issue <a href="lwg-defects.html#2180" title="Exceptions from std::seed_seq operations (Status: C++14)">2180</a><sup><a href="https://cplusplus.github.io/LWG/issue2180" title="Latest snapshot">(i)</a></sup> points out some deficiences in regard to the specification of the library-provided
type <code>std::seed_seq</code> regarding exceptions, but there is another specification problem 
in regard to general types satisfying the <em>seed sequence</em> constraints (named <code>SSeq</code>) as described in 
29.5.3.2 <a href="https://wg21.link/rand.req.seedseq">[rand.req.seedseq]</a>.
<p/>
29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> p3 and 29.5.5.1 <a href="https://wg21.link/rand.adapt.general">[rand.adapt.general]</a> p3 say upfront:
</p>
<blockquote><p>
Except where specified otherwise, no function described in this section 
29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a>/29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a> throws an exception.
</p></blockquote>
<p>
This constraint causes problems, because the described templates in these sub-clauses depend on operations of 
<code>SSeq::generate()</code> which is a function template, that depends both on operations provided by the 
implementor of <code>SSeq</code> (e.g. of <code>std::seed_seq</code>), and those of the random access iterator type 
provided by the caller. With class template <code>linear_congruential_engine</code> we have just one example for a user 
of <code>SSeq::generate()</code> via:
</p>
<blockquote><pre>
template&lt;class Sseq&gt; 
linear_congruential_engine&lt;&gt;::linear_congruential_engine(Sseq&amp; q);

template&lt;class Sseq&gt; 
void linear_congruential_engine&lt;&gt;::seed(Sseq&amp; q);
</pre></blockquote>
<p>
None of these operations has an exclusion rule for exceptions.
<p/>
As described in <a href="lwg-defects.html#2180" title="Exceptions from std::seed_seq operations (Status: C++14)">2180</a><sup><a href="https://cplusplus.github.io/LWG/issue2180" title="Latest snapshot">(i)</a></sup> the wording for <code>std::seed_seq</code> should and can be fixed to ensure that 
operations of <code>seed_seq::generate()</code> won't throw except from operations of the provided iterator range, 
but there is no corresponding "safety belt" for user-provided <code>SSeq</code> types, since 29.5.3.2 <a href="https://wg21.link/rand.req.seedseq">[rand.req.seedseq]</a>
does not impose no-throw requirements onto operations of <em>seed sequences</em>.
</p>

<ol style="list-style-type:upper-roman">

<li><p>
A quite radical step to fix this problem would be to impose general no-throw requirements on the expression
<code>q.generate(rb,re)</code> from Table 115, but this is not as simple as it looks initially, because this
function again depends on general types that are mutable random access iterators. Typically, we do not
impose no-throw requirements on iterator operations and this would restrict general seed sequences where
exceptions are not a problem. Furthermore, we do not impose comparable constraints for other expressions,
like that of the expression <code>g()</code> in Table 116 for good reasons, e.g. <code>random_device::operator()</code>
explicitly states when it throws exceptions.
</p></li>

<li><p>
A less radical variant of the previous suggestion would be to add a normative requirement on the expression
<code>q.generate(rb,re)</code> from Table 115 that says: "Throws nothing if operations of <code>rb</code> and <code>re</code> 
do not throw exceptions". Nevertheless we typically do not describe <em>conditional</em> Throws elements in proper
requirement sets elsewhere (Container requirements excluded, they just describe the containers from Clause 23)
and this may exclude resonable implementations of seed sequences that could throw exceptions under rare
situations. 
</p></li>

<li><p>
The iterator arguments provided to <code>SSeq::generate()</code> for operations in templates of 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> and 
29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a> are under control of implementations, so we could impose stricter exceptions requirements
on <code>SSeq::generate()</code> for <code>SSeq</code> types that are used to instantiate member templates in 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> 
and 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a> solely.
</p></li>

<li><p>
We simply add extra wording to the introductive parts of 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> and 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a>
that specify that operations of the engine (adaptor) templates that depend on a template parameter <code>SSeq</code>
throw no exception unless <code>SSeq::generate()</code> throws an exception.
</p></li>
</ol>

<p>
Given these options I would suggest to apply the variant described in the fourth bullet.
<p/>
The proposed resolution attempts to reduce a lot of the redundancies of requirements in the introductory paragraphs of 
29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> and 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a> by introducing a new intermediate sub-clause 
"Engine and engine adaptor class templates" following sub-clause 29.5.2 <a href="https://wg21.link/rand.synopsis">[rand.synopsis]</a>. This approach also
solves the problem that currently 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> also describes requirements that apply for
29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a> (Constrained templates involving the <code>Sseq</code> parameters).
</p>

<p><i>[2013-04-20, Bristol]</i></p>


<p>
Remove the first bullet point:
</p>
<blockquote><p>
?- Throughout this sub-clause general requirements and conventions are described that apply to every class 
template specified in sub-clause 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> and 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a>. Phrases of the form "in those 
sub-clauses" shall be interpreted as equivalent to "in sub-clauses 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> and 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a>". 
</p></blockquote>
<p>
Replace "in those sub-clauses" with "in sub-clauses 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> and 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a>".
<p/>
Find another place for the wording. 
<p/>
Daniel: These are requirements on the implementation not on the types. I'm not comfortable in moving it to another place 
without double checking. 
<p/>
Improve the text (there are 4 "for"s): <em>for</em> copy constructors, <em>for</em> copy assignment operators, 
<em>for</em> streaming operators, and <em>for</em> equality and inequality operators are not shown in the synopses. 
<p/>
Move the information of this paragraph to the paragraphs it refers to: 
</p>
<blockquote><p>
"-?- Descriptions are provided in those sub-clauses only for engine operations that are not described in 
29.5.3.4 <a href="https://wg21.link/rand.req.eng">[rand.req.eng]</a>, for adaptor operations that are not described in 29.5.3.5 <a href="https://wg21.link/rand.req.adapt">[rand.req.adapt]</a>, or for 
operations where there is additional semantic information. In particular, declarations for copy constructors, for 
copy assignment operators, for streaming operators, and for equality and inequality operators are not shown in the synopses." 
</p></blockquote>
<p>
Alisdair: I prefer duplication here than consolidation/reference to these paragraphs. 
<p/>
The room showed weakly favjust or for duplication. 
</p>

<p>
<strong>Previous resolution from Daniel [SUPERSEDED]:</strong>
</p>
<blockquote class="note">
<ol>
<li><p>Add a new sub-clause titled "Engine and engine adaptor class templates" following sub-clause 
29.5.2 <a href="https://wg21.link/rand.synopsis">[rand.synopsis]</a> (but at the same level) and add one further sub-clause "General" as
child of the new sub-clause as follows:
<p/>
<ins>Engine and engine adaptor class templates [rand.engadapt]</ins>
<p/>
<ins>General [rand.engadapt.general]</ins>
</p>
<blockquote><p>
<ins>-?- Throughout this sub-clause general requirements and conventions are described that apply to every class 
template specified in sub-clause 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> and 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a>. Phrases of the 
form "in those sub-clauses" shall be interpreted as equivalent to "in sub-clauses 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> and 
29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a>".
</ins>
<p/>
<ins>-?- Except where specified otherwise, the complexity of each function specified in those sub-clauses is constant.</ins>
<p/>
<ins>-?- Except where specified otherwise, no function described in those sub-clauses throws an exception.</ins>
<p/>
<ins>-?- Every function described in those sub-clauses that has a function parameter <code>q</code> of type
<code>SSeq&amp;</code> for a template type parameter named <code>SSeq</code> that is different from type <code>std::seed_seq</code> 
throws what and when the invocation of <code>q.generate</code> throws.</ins>
<p/>
<ins>-?- Descriptions are provided in those sub-clauses only for engine operations that are not described in 
29.5.3.4 <a href="https://wg21.link/rand.req.eng">[rand.req.eng]</a>, for adaptor operations that are not described in 29.5.3.5 <a href="https://wg21.link/rand.req.adapt">[rand.req.adapt]</a>,
or for operations where there is additional semantic information. In particular, declarations for copy constructors,
for copy assignment operators, for streaming operators, and for equality and inequality operators
are not shown in the synopses.</ins>
<p/>
<ins>-?- Each template specified in those sub-clauses requires one or more relationships, involving the value(s) of
its non-type template parameter(s), to hold. A program instantiating any of these templates is ill-formed if
any such required relationship fails to hold.</ins>
<p/>
<ins>-?- For every random number engine and for every random number engine adaptor <code>X</code> defined in those 
sub-clauses:</ins>
</p>
<ul>
<li><p>
<ins>if the constructor</ins>
</p>
<blockquote><pre>
<ins>template &lt;class Sseq&gt; explicit X(Sseq&amp; q);</ins>
</pre></blockquote>
<p>
<ins>is called with a type <code>Sseq</code> that does not qualify as a seed sequence, then this constructor shall not
participate in overload resolution;</ins>
</p>
</li>

<li><p>
<ins>if the member function</ins>
</p>
<blockquote><pre>
<ins>template &lt;class Sseq&gt; void seed(Sseq&amp; q);</ins>
</pre></blockquote>
<p>
<ins>is called with a type <code>Sseq</code> that does not qualify as a seed sequence, then this function shall not
participate in overload resolution;</ins>
</p>
</li>
</ul>
<p>
<ins>The extent to which an implementation determines that a type cannot be a seed sequence is unspecified,
except that as a minimum a type shall not qualify as a seed sequence if it is implicitly convertible to
<code>X::result_type</code>.</ins>
</p>
</blockquote>

</li>

<li><p>Edit the contents of sub-clause 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> as indicated:</p>

<blockquote><p>
-1- Each type instantiated from a class template specified in this section 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> satisfies the 
requirements of a random number engine (29.5.3.4 <a href="https://wg21.link/rand.req.eng">[rand.req.eng]</a>) type <ins>and the general implementation 
requirements specified in sub-clause [rand.engadapt.general]</ins>.
<p/>
<del>-2- Except where specified otherwise, the complexity of each function specified in this section 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> 
is constant.</del>
<p/>
<del>-3- Except where specified otherwise, no function described in this section 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> throws an exception.</del>
<p/>
<del>-4- Descriptions are provided in this section 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> only for engine operations that are not 
described in 29.5.3.4 <a href="https://wg21.link/rand.req.eng">[rand.req.eng]</a> [&hellip;]</del>
<p/>
<del>-5- Each template specified in this section 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> requires one or more relationships, 
involving the value(s) of its non-type template parameter(s), to hold. [&hellip;]</del>
<p/>
<del>-6- For every random number engine and for every random number engine adaptor <code>X</code> defined in this subclause
(29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a>) and in sub-clause 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a>: [&hellip;]</del>
</p></blockquote>

</li>

<li><p>Edit the contents of sub-clause 29.5.5.1 <a href="https://wg21.link/rand.adapt.general">[rand.adapt.general]</a> as indicated:</p>

<blockquote><p>
-1- Each type instantiated from a class template specified in this section <del>29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a></del><ins>29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a></ins> satisfies the 
requirements of a random number engine adaptor (29.5.3.5 <a href="https://wg21.link/rand.req.adapt">[rand.req.adapt]</a>) type <ins>and the general 
implementation requirements specified in sub-clause [rand.engadapt.general]</ins>.
<p/>
<del>-2- Except where specified otherwise, the complexity of each function specified in this section 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a> 
is constant.</del>
<p/>
<del>-3- Except where specified otherwise, no function described in this section 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a> throws an exception.</del>
<p/>
<del>-4- Descriptions are provided in this section 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a> only for engine operations that are not 
described in 29.5.3.5 <a href="https://wg21.link/rand.req.adapt">[rand.req.adapt]</a> [&hellip;]</del>
<p/>
<del>-5- Each template specified in this section 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a> requires one or more relationships, involving 
the value(s) of its non-type template parameter(s), to hold. [&hellip;]</del>
</p></blockquote>

</li>

</ol>
</blockquote>

<p><i>[2014-02-09, Daniel provides alternative resolution]</i></p>


<p><i>[Lenexa 2015-05-07: Move to Ready]</i></p>

<p>LWG 2181 exceptions from seed sequence operations</p>
<p>STL: Daniel explained that I was confused. I said, oh, seed_seq says it can throw if the RanIt throws. Daniel says the RanIts are provided by the engine. Therefore if you give a seed_seq to an engine, it cannot throw, as implied by the current normative text. So what Daniel has in the PR is correct, if slightly unnecessary. It's okay to have explicitly non-overlapping Standardese even if overlapping would be okay.</p>
<p>Marshall: And this is a case where the std:: on seed_seq is a good thing.</p>
<p>STL: Meh.</p>
<p>STL: And that was my only concern with this PR. I like the latest PR much better than the previous.</p>
<p>Marshall: Yes. There's a drive-by fix for referencing the wrong section. Other than that, the two are the same.</p>
<p>STL: Alisdair wanted the repetition instead of centralization, and I agree.</p>
<p>Marshall: Any other opinions?</p>
<p>Jonathan: I'll buy it.</p>
<p>STL: For a dollar?</p>
<p>Hwrd: I'll buy that for a nickel.</p>
<p>Marshall: Any objections to Ready? I don't see a point in Immediate.</p>
<p>Jonathan: Absolutely agree.</p>
<p>Marshall: 7 for ready, 0 opposed, 0 abstain.</p>

<p><i>[2014-05-22, Daniel syncs with recent WP]</i></p>


<p><i>[2015-10-31, Daniel comments and simplifies suggested wording changes]</i></p>

<p>
Upon Walter Brown's suggestion the revised wording does not contain any wording changes that could be
considered as editorial. 
</p>

<p>
<strong>Previous resolution from Daniel [SUPERSEDED]:</strong>
</p>
<blockquote class="note">
<p>This wording is relative to N3936.</p>

<ol>
<li><p>Edit the contents of sub-clause 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> as indicated:</p>

<blockquote><p>
-1- Each type instantiated from a class template specified in this section 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> satisfies the 
requirements of a random number engine (29.5.3.4 <a href="https://wg21.link/rand.req.eng">[rand.req.eng]</a>) type.
<p/>
-2- Except where specified otherwise, the complexity of each function specified in this section 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> 
is constant.
<p/>
-3- Except where specified otherwise, no function described in this section 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> throws an exception.
<p/>
<ins>-?- Every function described in this section 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> that has a function parameter <code>q</code> of 
type <code>Sseq&amp;</code> for a template type parameter named <code>Sseq</code> that is different from type <code>std::seed_seq</code> 
throws what and when the invocation of <code>q.generate</code> throws.</ins>
<p/>
-4- Descriptions are provided in this section 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> only for engine operations that are not 
described in 29.5.3.4 <a href="https://wg21.link/rand.req.eng">[rand.req.eng]</a> or for operations where there is additional semantic information. In particular, 
declarations for copy constructors, <del>for</del> copy assignment operators, <del>for</del> streaming operators, <del>and 
for</del> equality <ins>operators,</ins> and inequality operators are not shown in the synopses.
<p/>
-5- Each template specified in this section 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> requires one or more relationships, 
involving the value(s) of its non-type template parameter(s), to hold. A program instantiating any of these templates is 
ill-formed if any such required relationship fails to hold.
<p/>
-6- For every random number engine and for every random number engine adaptor <code>X</code> defined in this subclause
(29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a>) and in sub-clause 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a>: 
</p>
<ul>
<li><p>
if the constructor
</p>
<blockquote><pre>
template &lt;class Sseq&gt; explicit X(Sseq&amp; q);
</pre></blockquote>
<p>
is called with a type <code>Sseq</code> that does not qualify as a seed sequence, then this constructor shall not
participate in overload resolution;
</p>
</li>
<li><p>
if the member function
</p>
<blockquote><pre>
template &lt;class Sseq&gt; void seed(Sseq&amp; q);
</pre></blockquote>
<p>
is called with a type <code>Sseq</code> that does not qualify as a seed sequence, then this function shall not
participate in overload resolution;
</p>
</li>
</ul>
<p>
The extent to which an implementation determines that a type cannot be a seed sequence is unspecified,
except that as a minimum a type shall not qualify as a seed sequence if it is implicitly convertible to
<code>X::result_type</code>.
</p>
</blockquote>
</li>

<li><p>Edit the contents of sub-clause 29.5.5.1 <a href="https://wg21.link/rand.adapt.general">[rand.adapt.general]</a> as indicated:</p>

<blockquote><p>
-1- Each type instantiated from a class template specified in this section 
<del>29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a></del><ins>29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a></ins> satisfies the requirements of a 
random number engine adaptor (29.5.3.5 <a href="https://wg21.link/rand.req.adapt">[rand.req.adapt]</a>) type.
<p/>
-2- Except where specified otherwise, the complexity of each function specified in this section 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a> 
is constant.
<p/>
-3- Except where specified otherwise, no function described in this section 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a> throws an exception.
<p/>
<ins>-?- Every function described in this section 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a> that has a function parameter <code>q</code> of 
type <code>Sseq&amp;</code> for a template type parameter named <code>Sseq</code> that is different from type <code>std::seed_seq</code> 
throws what and when the invocation of <code>q.generate</code> throws.</ins>
<p/>
-4- Descriptions are provided in this section 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a> only for adaptor operations that are not 
described in section 29.5.3.5 <a href="https://wg21.link/rand.req.adapt">[rand.req.adapt]</a> or for operations where there is additional semantic information. In particular, 
declarations for copy constructors, <del>for</del> copy assignment operators, <del>for</del> streaming operators, <del>and for</del> 
equality <ins>operators,</ins> and inequality operators are not shown in the synopses.
<p/>
-5- Each template specified in this section 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a> requires one or more relationships, involving 
the value(s) of its non-type template parameter(s), to hold. A program instantiating any of these templates is ill-formed if
any such required relationship fails to hold.
</p></blockquote>
</li>

<li><p>Edit the contents of sub-clause 29.5.9.1 <a href="https://wg21.link/rand.dist.general">[rand.dist.general]</a> p2 as indicated: [<i>Drafting note</i>: These
editorial changes are just for consistency with those applied to 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> and 
29.5.5.1 <a href="https://wg21.link/rand.adapt.general">[rand.adapt.general]</a> &mdash; <i>end drafting note</i>]</p>

<blockquote><p>
-2- Descriptions are provided in this section 29.5.9 <a href="https://wg21.link/rand.dist">[rand.dist]</a> only for distribution operations that are not 
described in 29.5.3.6 <a href="https://wg21.link/rand.req.dist">[rand.req.dist]</a> or for operations where there is additional semantic information. In particular, 
declarations for copy constructors, <del>for</del> copy assignment operators, <del>for</del> streaming operators, <del>and for</del> 
equality <ins>operators,</ins> and inequality operators are not shown in the synopses.
</p></blockquote>
</li>

</ol>
</blockquote>


<p id="res-2181"><b>Proposed resolution:</b></p>
<p>This wording is relative to N4527.</p>

<ol>
<li><p>Edit the contents of sub-clause 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> as indicated:</p>

<blockquote><p>
-1- [&hellip;]
<p/>
-2- Except where specified otherwise, the complexity of each function specified in this section 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> 
is constant.
<p/>
-3- Except where specified otherwise, no function described in this section 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> throws an exception.
<p/>
<ins>-?- Every function described in this section 29.5.4 <a href="https://wg21.link/rand.eng">[rand.eng]</a> that has a function parameter <code>q</code> of 
type <code>Sseq&amp;</code> for a template type parameter named <code>Sseq</code> that is different from type <code>std::seed_seq</code> 
throws what and when the invocation of <code>q.generate</code> throws.</ins>
<p/>
[&hellip;]
</p>
</blockquote>
</li>

<li><p>Edit the contents of sub-clause 29.5.5.1 <a href="https://wg21.link/rand.adapt.general">[rand.adapt.general]</a> as indicated:</p>

<blockquote><p>
-1- [&hellip;]
<p/>
-2- Except where specified otherwise, the complexity of each function specified in this section 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a> 
is constant.
<p/>
-3- Except where specified otherwise, no function described in this section 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a> throws an exception.
<p/>
<ins>-?- Every function described in this section 29.5.5 <a href="https://wg21.link/rand.adapt">[rand.adapt]</a> that has a function parameter <code>q</code> of 
type <code>Sseq&amp;</code> for a template type parameter named <code>Sseq</code> that is different from type <code>std::seed_seq</code> 
throws what and when the invocation of <code>q.generate</code> throws.</ins>
</p></blockquote>
</li>

</ol>





</body>
</html>
