Skip to content

Commit f6eec41

Browse files
committed
New issue from Jiang An: "Philox engines should be freestanding"
1 parent c268239 commit f6eec41

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

xml/issue4224.xml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4224" status="New">
5+
<title>Philox engines should be freestanding</title>
6+
<section>
7+
<sref ref="[rand.eng.philox]"/>
8+
</section>
9+
<submitter>Jiang An</submitter>
10+
<date>15 Mar 2025</date>
11+
<priority>99</priority>
12+
13+
<discussion>
14+
<p>
15+
Philox engines don't seem to require floating-point operations or support from the operating system,
16+
so they are probably suitable for freestanding. However, as <paper num="P2976R1"/> was finished before
17+
the adoption of <paper num="P2075R6"/>, these engines are not made freestanding yet.
18+
</p>
19+
</discussion>
20+
21+
<resolution>
22+
<p>
23+
This wording is relative to <paper num="N5001"/>.
24+
</p>
25+
26+
<ol>
27+
28+
<li><p>Modify <sref ref="[rand.synopsis]"/>, header <tt>&lt;random&gt;</tt> synopsis, as indicated:</p>
29+
30+
<blockquote>
31+
<pre>
32+
[&hellip;]
33+
// <i><sref ref="[rand.eng.philox]"/>, class template philox_engine</i>
34+
template&lt;class UIntType, size_t w, size_t n, size_t r, UIntType... consts&gt;
35+
class philox_engine; <ins>// <i>partially freestanding</i></ins>
36+
37+
[&hellip;]
38+
using philox4x32 = <i>see below</i>; <ins>// <i>freestanding</i></ins>
39+
using philox4x64 = <i>see below</i>; <ins>// <i>freestanding</i></ins>
40+
[&hellip;]
41+
</pre>
42+
</blockquote>
43+
</li>
44+
45+
<li><p>Modify <sref ref="[rand.eng.philox]"/>, class template `philox_engine` synopsis, as indicated:</p>
46+
47+
<blockquote>
48+
<pre>
49+
namespace std {
50+
template&lt;class UIntType, size_t w, size_t n, size_t r, UIntType... consts&gt;
51+
class philox_engine {
52+
[&hellip;]
53+
// <i>inserters and extractors</i>
54+
template&lt;class charT, class traits&gt;
55+
friend basic_ostream&lt;charT, traits&gt;&amp;
56+
operator&lt;&lt;(basic_ostream&lt;charT, traits&gt;&amp; os, const philox_engine&amp; x); <ins>// <i>hosted</i></ins>
57+
template&lt;class charT, class traits&gt;
58+
friend basic_istream&lt;charT, traits&gt;&amp;
59+
operator&gt;&gt;(basic_istream&lt;charT, traits&gt;&amp; is, philox_engine&amp; x); <ins>// <i>hosted</i></ins>
60+
};
61+
}
62+
</pre>
63+
</blockquote>
64+
</li>
65+
</ol>
66+
</resolution>
67+
68+
</issue>

0 commit comments

Comments
 (0)