Skip to content

Commit

Permalink
Automatic update from GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Feb 5, 2024
1 parent f839921 commit add76e0
Show file tree
Hide file tree
Showing 22 changed files with 177 additions and 48 deletions.
47 changes: 45 additions & 2 deletions issue4052.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Issue 4052: Bogus requirement for piecewise_linear_distribution</title>
<title>Issue 4052: Bogus requirements for piecewise_linear_distribution</title>
<style>
p {text-align:justify}
li {text-align:justify}
Expand Down Expand Up @@ -56,7 +56,7 @@
<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#New">New</a> status.</em></p>
<h3 id="4052"><a href="lwg-active.html#4052">4052</a>. Bogus requirement for <code>piecewise_linear_distribution</code></h3>
<h3 id="4052"><a href="lwg-active.html#4052">4052</a>. Bogus requirements for <code>piecewise_linear_distribution</code></h3>
<p><b>Section:</b> 28.5.9.6.2 <a href="https://wg21.link/rand.dist.samp.pconst">[rand.dist.samp.pconst]</a>, 28.5.9.6.3 <a href="https://wg21.link/rand.dist.samp.plinear">[rand.dist.samp.plinear]</a> <b>Status:</b> <a href="lwg-active.html#New">New</a>
<b>Submitter:</b> Jonathan Wakely <b>Opened:</b> 2024-02-05 <b>Last modified:</b> 2024-02-05</p>
<p><b>Priority: </b>Not Prioritized
Expand Down Expand Up @@ -95,6 +95,7 @@ <h3 id="4052"><a href="lwg-active.html#4052">4052</a>. Bogus requirement for <co
<code>is_invocable_r_v&lt;double, UnaryOperation&amp;, double&gt;</code>
is <code>true</code>.
</p>
<p><em>Preconditions</em>: [...]</p>
<p><em>Effects</em>: [...]</p>

</blockquote>
Expand All @@ -113,6 +114,48 @@ <h3 id="4052"><a href="lwg-active.html#4052">4052</a>. Bogus requirement for <co
and was only partially fixed by LWG <a href="lwg-defects.html#1439" title="Return from densities() functions?">1439</a>.
</p>

<p>
Finally, the preconditions also say:
</p>
<blockquote>
<em>Preconditions</em>: [...]
If <code>firstB == lastB</code> or <code>++firstB == lastB</code>,
let <em>n</em> = 1, <em>ρ</em><sub>0</sub> = <em>ρ</em><sub>1</sub> = 1,
<em>b</em><sub>0</sub> = 0, and <em>b</em><sub>1</sub> = 1.
Otherwise, [<code>firstB</code>, <code>lastB</code>)
forms a sequence <em>b</em> of length <em>n</em> + 1,
the length of the sequence <em>w</em> starting
from <code>firstW</code> is at least <em>n</em>,
and any <em>w<sub>k</sub></em> for <em>k</em><em>n</em>
are ignored by the distribution.
</blockquote>
<p>
These are not preconditions. I think it is trying to say something like:
</p>
<blockquote>
<p>
<em>Preconditions</em>: [...]
[<code>firstB</code>, <code>lastB</code>) is a valid range and
[<code>firstW</code>, <code>firstW + (lastB - firstB)</code>)
is a valid range.
</p>
<p>
<em>Effects</em>:
If <code>firstB == lastB</code> or <code>++firstB == lastB</code>,
let <em>n</em> = 1, <em>ρ</em><sub>0</sub> = <em>ρ</em><sub>1</sub> = 1,
<em>b</em><sub>0</sub> = 0, and <em>b</em><sub>1</sub> = 1.
Otherwise, let [<code>firstB</code>, <code>lastB</code>) form a sequence
<em>b</em><sub>0</sub>, &hellip;, <em>b</em><sub>n</sub>,
and let <em>w<sub>k</sub></em> = <code>*firstW++</code>
for <em>k</em> = 0, &hellip;, <em>n</em>.
</p>
</blockquote>

<p>
The equivalent constructor for <code>piecewise_constant_distribution</code>
has similar problems with its preconditions in terms of <em>n</em> + 1.
</p>


<p id="res-4052"><b>Proposed resolution:</b></p>
<p>
Expand Down
49 changes: 46 additions & 3 deletions lwg-active.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lwg-closed.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
</tr>
</table>
<h1>C++ Standard Library Closed Issues List (Revision D125)</h1>
<p>Revised 2024-02-05 at 12:15:27 UTC
<p>Revised 2024-02-05 at 12:52:21 UTC
</p>
<p>Reference ISO/IEC IS 14882:2020(E)</p>
<p>Also see:</p>
Expand Down Expand Up @@ -108,7 +108,7 @@ <h2 id='History'>Revision History</h2>
<li>Added the following 83 New issues: <a href="lwg-active.html#3945" title="&sect;[cstdarg.syn] 'Compatible types' are undefined">3945</a>, <a href="lwg-active.html#3952" title="iter_common_reference_t does not conform to the definition of indirectly_readable">3952</a>, <a href="lwg-active.html#3954" title="Feature-test macros in C headers (&lt;stddef.h&gt; etc.)">3954</a>, <a href="lwg-active.html#3955" title="Add noexcept to several repeat_view[::iterator] member functions">3955</a>, <a href="lwg-active.html#3956" title="chrono::parse uses from_stream as a customization point">3956</a>, <a href="lwg-active.html#3959" title="Should the comparator of std::flat_map/std::flat_multimap be copied twice in some operations?">3959</a>, <a href="lwg-active.html#3960" title="How does chrono::parse handle duplicated data?">3960</a>, <a href="lwg-active.html#3961" title="Does chrono::parse check format strings?">3961</a>, <a href="lwg-active.html#3962" title="What is the &quot;decimal precision of the input&quot;?">3962</a>, <a href="lwg-active.html#3963" title="Different std::flat_map/std::flat_multimap specializations should be able to share same nested classes">3963</a>, <a href="lwg-active.html#3964" title="std::atan2 and std::pow overloads that take two std::valarray parameters
should require the arguments to have the same length">3964</a>, <a href="lwg-active.html#3966" title="The value_type and reference members of std::flat_(multi)map::(const_)iterator are unclear">3966</a>, <a href="lwg-active.html#3967" title="The specification for std::is_nothrow_* traits may be ambiguous in some cases involving noexcept(false)">3967</a>, <a href="lwg-active.html#3968" title="std::endian::native value should be more specific about object representations">3968</a>, <a href="lwg-active.html#3969" title="std::ranges::fold_left_first_with_iter should be more ADL-proof">3969</a>, <a href="lwg-active.html#3972" title="Issues with join_with_view::iterator's iter_swap">3972</a>, <a href="lwg-active.html#3976" title="What does it mean for a type to be &quot;allocator aware&quot;?">3976</a>, <a href="lwg-active.html#3977" title="constexpr and noexcept for operators for bitmask types">3977</a>, <a href="lwg-active.html#3978" title="The &quot;no effect&quot; requirement for std::ignore is unimplementable for volatile bit-fields">3978</a>, <a href="lwg-active.html#3979" title="Should we reject std::bind_front&lt;42&gt;() and its friends?">3979</a>, <a href="lwg-active.html#3983" title="ranges::to adaptors are underconstrained">3983</a>, <a href="lwg-active.html#3985" title="ranges::to should Mandates C not to be view">3985</a>, <a href="lwg-active.html#3986" title="basic_const_iterator doesn't work with optional">3986</a>, <a href="lwg-active.html#3989" title="The whole range for an iterator obtained from a std::span or std::basic_string_view is not clear">3989</a>, <a href="lwg-active.html#3991" title="variant's move assignment should not be guaranteed to produce a valueless by exception state">3991</a>, <a href="lwg-active.html#3992" title="basic_stringbuf::str()&amp;&amp; should enforce &#x1d4aa;(1)">3992</a>, <a href="lwg-active.html#3993" title="The parse function of a BasicFormatter type needs to be constexpr">3993</a>, <a href="lwg-active.html#3994" title="adaptor(args...)(r) is not equivalent to std::bind_back(adaptor, args...)(r)">3994</a>, <a href="lwg-active.html#3995" title="Issue with custom index conversion in &lt;mdspan&gt;">3995</a>, <a href="lwg-active.html#3997" title="std::formatter specializations should be consistently restricted to supported character types">3997</a>, <a href="lwg-active.html#3998" title="Constants in std::regex_constants should be allowed to be enumerators">3998</a>, <a href="lwg-active.html#3999" title="P0439R0 changed the value category of memory order constants">3999</a>, <a href="lwg-active.html#4000" title="flat_map::insert_range's Effects is not quite right">4000</a>, <a href="lwg-active.html#4002" title="The definition of iota_view::iterator::iterator_concept should be improved">4002</a>, <a href="lwg-active.html#4004" title="The load and store operation in &sect;[atomics.order] p1 is ambiguous">4004</a>, <a href="lwg-active.html#4005" title="&quot;Required behavior&quot; too narrowly defined">4005</a>, <a href="lwg-active.html#4006" title="chunk_view::outer-iterator::value_type should provide empty">4006</a>, <a href="lwg-active.html#4007" title="Mystic prohibition of calling a volatile-qualified perfect forwarding call wrapper">4007</a>, <a href="lwg-active.html#4008" title="&sect;[range.utility.conv.to] ranges::to may cause infinite recursion if range_value_t&lt;C&gt;
is a non-move-constructible range">4008</a>, <a href="lwg-active.html#4009" title="drop_view::begin const may have &#x1d4aa;(n) complexity">4009</a>, <a href="lwg-active.html#4010" title="subrange::advance should be improved">4010</a>, <a href="lwg-active.html#4011" title="&quot;Effects: Equivalent to return&quot; in [span.elem]">4011</a>, <a href="lwg-active.html#4012" title="common_view::begin/end are missing the simple-view check">4012</a>, <a href="lwg-active.html#4013" title="lazy_split_view::outer-iterator::value_type should not provide default constructor">4013</a>, <a href="lwg-active.html#4014" title="LWG 3809 changes behavior of some existing std::subtract_with_carry_engine code">4014</a>, <a href="lwg-active.html#4015" title="LWG 3973 broke const overloads of std::optional monadic operations">4015</a>, <a href="lwg-active.html#4016" title="container-insertable checks do not match what container-inserter does">4016</a>, <a href="lwg-active.html#4017" title="Behavior of std::views::split on an empty range">4017</a>, <a href="lwg-active.html#4018" title="ranges::to's copy branch is underconstrained">4018</a>, <a href="lwg-active.html#4019" title="Reversing an infinite range leads to an infinite loop">4019</a>, <a href="lwg-active.html#4020" title="extents::index-cast weirdness">4020</a>, <a href="lwg-active.html#4021" title="mdspan::is_always_meow() should be noexcept">4021</a>, <a href="lwg-active.html#4022" title="Ambiguity in the formatting of negative years with format specifier %C">4022</a>, <a href="lwg-active.html#4023" title="Preconditions of std::basic_streambuf::setg/setp">4023</a>, <a href="lwg-active.html#4024" title="Underspecified destruction of objects created in std::make_shared_for_overwrite/std::allocate_shared_for_overwrite">4024</a>, <a href="lwg-active.html#4025" title="Move assignment operator of std::expected&lt;cv void, E&gt; should not be conditionally deleted">4025</a>, <a href="lwg-active.html#4026" title="Assignment operators of std::expected should propagate triviality">4026</a>, <a href="lwg-active.html#4027" title="possibly-const-range should prefer returning const R&amp;">4027</a>, <a href="lwg-active.html#4028" title="std::is_(nothrow_)convertible should be reworded to avoid dependence on the return statement">4028</a>, <a href="lwg-active.html#4029" title="basic_string accidentally fails to meet the reversible container requirements">4029</a>, <a href="lwg-active.html#4030" title="Clarify whether arithmetic expressions in [numeric.sat.func] are mathematical or C++">4030</a>, <a href="lwg-active.html#4031" title="bad_expected_access&lt;void&gt; member functions should be noexcept">4031</a>, <a href="lwg-active.html#4032" title="Possibly invalid types in the constraints of constructors of std::shared_ptr">4032</a>, <a href="lwg-active.html#4033" title="&sect;[macro.names] defining macros after importing the standard library">4033</a>, <a href="lwg-active.html#4034" title="Clarify specification of std::min and std::max">4034</a>, <a href="lwg-active.html#4035" title="single_view should provide empty">4035</a>, <a href="lwg-active.html#4036" title="__alignof_is_defined is only implicitly specified in C++ and not yet deprecated">4036</a>, <a href="lwg-active.html#4037" title="Static data members of ctype_base are not yet required to be usable in constant expressions">4037</a>, <a href="lwg-active.html#4038" title="std::text_encoding::aliases_view should have constexpr iterators">4038</a>, <a href="lwg-active.html#4039" title="&sect;[ostream.formatted.print]: Inappropriate usage of badbit in definition of
vprint_unicode/vprint_nonunicode">4039</a>, <a href="lwg-active.html#4040" title="Contradictory specification of std::tuple_size">4040</a>, <a href="lwg-active.html#4041" title="The requirements on literal type in [concept.swappable] should be removed">4041</a>, <a href="lwg-active.html#4042" title="std::print should permit an efficient implementation">4042</a>, <a href="lwg-active.html#4043" title="&quot;ASCII&quot; is not a registered character encoding">4043</a>, <a href="lwg-active.html#4044" title="Confusing requirements for std::print on POSIX platforms">4044</a>, <a href="lwg-active.html#4045" title="tuple can create dangling references from tuple-like">4045</a>, <a href="lwg-active.html#4046" title="Effects of inserting into or erasing from flat container adaptors when an exception is thrown need to be more permissive">4046</a>, <a href="lwg-active.html#4047" title="Explicitly specifying template arguments for std::swap should not be supported">4047</a>, <a href="lwg-active.html#4048" title="Inconsistent preconditions for transparent insertion of std::flat_map/std::flat_set">4048</a>, <a href="lwg-active.html#4049" title="C &lt;foo.h&gt; headers not in freestanding">4049</a>, <a href="lwg-active.html#4050" title="Should views::iota(0) | views::take(5) be views::iota(0, 5)?">4050</a>, <a href="lwg-active.html#4051" title="A less hacky and more useful way to compare comparison category types">4051</a>, <a href="lwg-active.html#4052" title="Bogus requirement for piecewise_linear_distribution">4052</a>.</li>
vprint_unicode/vprint_nonunicode">4039</a>, <a href="lwg-active.html#4040" title="Contradictory specification of std::tuple_size">4040</a>, <a href="lwg-active.html#4041" title="The requirements on literal type in [concept.swappable] should be removed">4041</a>, <a href="lwg-active.html#4042" title="std::print should permit an efficient implementation">4042</a>, <a href="lwg-active.html#4043" title="&quot;ASCII&quot; is not a registered character encoding">4043</a>, <a href="lwg-active.html#4044" title="Confusing requirements for std::print on POSIX platforms">4044</a>, <a href="lwg-active.html#4045" title="tuple can create dangling references from tuple-like">4045</a>, <a href="lwg-active.html#4046" title="Effects of inserting into or erasing from flat container adaptors when an exception is thrown need to be more permissive">4046</a>, <a href="lwg-active.html#4047" title="Explicitly specifying template arguments for std::swap should not be supported">4047</a>, <a href="lwg-active.html#4048" title="Inconsistent preconditions for transparent insertion of std::flat_map/std::flat_set">4048</a>, <a href="lwg-active.html#4049" title="C &lt;foo.h&gt; headers not in freestanding">4049</a>, <a href="lwg-active.html#4050" title="Should views::iota(0) | views::take(5) be views::iota(0, 5)?">4050</a>, <a href="lwg-active.html#4051" title="A less hacky and more useful way to compare comparison category types">4051</a>, <a href="lwg-active.html#4052" title="Bogus requirements for piecewise_linear_distribution">4052</a>.</li>
<li>Added the following SG9 issue: <a href="lwg-active.html#3971" title="Join ranges of rvalue references with ranges of prvalues">3971</a>.</li>
<li>Added the following 14 WP issues: <a href="lwg-defects.html#3946" title="The definition of const_iterator_t should be reworked">3946</a>, <a href="lwg-defects.html#3947" title="Unexpected constraints on adjacent_transform_view::base()">3947</a>, <a href="lwg-defects.html#3948" title="possibly-const-range and as-const-pointer should be noexcept">3948</a>, <a href="lwg-defects.html#3949" title="std::atomic&lt;bool&gt;'s trivial destructor dropped in C++17 spec wording">3949</a>, <a href="lwg-defects.html#3951" title="&sect;[expected.object.swap]: Using value() instead of has_value()">3951</a>, <a href="lwg-defects.html#3953" title="iter_move for common_iterator and counted_iterator should return decltype(auto)">3953</a>, <a href="lwg-defects.html#3957" title="&sect;[container.alloc.reqmts] The value category of v should be claimed">3957</a>, <a href="lwg-defects.html#3965" title="Incorrect example in [format.string.escaped] p3 for formatting of combining characters">3965</a>, <a href="lwg-defects.html#3970" title="&sect;[mdspan.syn] Missing definition of full_extent_t and full_extent">3970</a>, <a href="lwg-defects.html#3973" title="Monadic operations should be ADL-proof">3973</a>, <a href="lwg-defects.html#3974" title="mdspan::operator[] should not copy OtherIndexTypes">3974</a>, <a href="lwg-defects.html#3987" title="Including &lt;flat_foo&gt; doesn't provide std::begin/end">3987</a>, <a href="lwg-defects.html#3990" title="Program-defined specializations of std::tuple and std::variant can't be properly supported">3990</a>, <a href="lwg-defects.html#4001" title="iota_view should provide empty">4001</a>.</li>
<li>Changed the following issue to Ready (from New): <a href="lwg-active.html#3919" title="enumerate_view may invoke UB for sized common non-forward underlying ranges">3919</a>.</li>
Expand Down
Loading

0 comments on commit add76e0

Please sign in to comment.