Skip to content

Commit c2e957f

Browse files
author
github-actions
committed
Automatic update from GitHub Actions workflow
1 parent a7e1918 commit c2e957f

22 files changed

+258
-72
lines changed

issue4230.html

Lines changed: 79 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,18 @@ <h3 id="4230"><a href="lwg-active.html#4230">4230</a>. <code>simd&lt;complex&gt;
8585
The design intent was to match the <code>std::complex&lt;T&gt;</code> interface. In which case
8686
the current wording doesn't match that intent. <code class='backtick'>complex</code> doesn't say <code>real(same_as&lt;T&gt; auto)</code>
8787
but 'real(T)', which allows conversions.
88+
<p/>
89+
This issue is also present in the <code class='backtick'>basic_simd(real, imag)</code> constructor. It deduces the type for the
90+
real/imag arguments instead of using a dependent type derived from <code class='backtick'>value_type</code> and ABI tag.
8891
</p>
92+
<blockquote><pre>
93+
// OK:
94+
complex&lt;double&gt; c{1., 1.f};
95+
96+
// <span style="color:red;font-weight:bolder">Ill-formed, should be allowed</span>:
97+
simd&lt;complex&lt;double&gt;&gt; sc0(1., 1.);
98+
simd&lt;complex&lt;double&gt;, 4&gt; sc1(simd&lt;double, 4&gt;(1.), simd&lt;float, 4&gt;(1.f));
99+
</pre></blockquote>
89100

90101

91102
<p id="res-4230"><b>Proposed resolution:</b></p>
@@ -99,27 +110,84 @@ <h3 id="4230"><a href="lwg-active.html#4230">4230</a>. <code>simd&lt;complex&gt;
99110

100111
<blockquote>
101112
<pre>
102-
[&hellip;]
103-
<i>// 99 [simd.complex.access], basic_simd complex-value accessors</i>
104-
constexpr auto real() const noexcept;
105-
constexpr auto imag() const noexcept;
106-
<del>template&lt;<i>simd-floating-point</i> V&gt;</del>
107-
constexpr void real(<ins><i>see below</i></ins><del>const V&amp;</del> v) noexcept;
113+
namespace std::datapar {
114+
template&lt;class T, class Abi&gt; class basic_simd {
115+
public:
116+
using value_type = T;
117+
using mask_type = basic_simd_mask&lt;sizeof(T), Abi&gt;;
118+
using abi_type = Abi;
119+
120+
<ins>using <i>real-type</i> = rebind_t&lt;typename T::value_type, basic_simd&gt; <i>// exposition-only</i></ins>
121+
122+
<i>// 29.10.6.2 <a href="https://wg21.link/simd.ctor">[simd.ctor]</a>, basic_simd constructors</i>
123+
[&hellip;]
124+
<del>template&lt;<i>simd-floating-point</i> V&gt;</del>
125+
constexpr explicit(<i>see below</i>) basic_simd(const <ins><i>real-type</i></ins><del>V</del>&amp; reals, const <ins><i>real-type</i></ins><del>V</del>&amp; imags = {}) noexcept;
126+
[&hellip;]
127+
<i>// 99 [simd.complex.access], basic_simd complex-value accessors</i>
128+
constexpr <ins><i>real-type</i></ins><del>auto</del> real() const noexcept;
129+
constexpr <ins><i>real-type</i></ins><del>auto</del> imag() const noexcept;
130+
<del>template&lt;<i>simd-floating-point</i> V&gt;</del>
131+
constexpr void real(const <ins><i>real-type</i></ins><del>V</del>&amp; v) noexcept;
132+
<del>template&lt;<i>simd-floating-point</i> V&gt;</del>
133+
constexpr void imag(const <ins><i>real-type</i></ins><del>V</del>&amp; v) noexcept;
134+
[&hellip;]
135+
};
136+
[&hellip;]
137+
}
138+
</pre>
139+
</blockquote>
140+
</li>
141+
142+
<li><p>Modify 29.10.6.2 <a href="https://wg21.link/simd.ctor">[simd.ctor]</a> as indicated:</p>
143+
144+
<blockquote>
145+
<pre>
108146
<del>template&lt;<i>simd-floating-point</i> V&gt;</del>
109-
constexpr void imag(<ins><i>see below</i></ins><del>const V&amp;</del> v) noexcept;
110-
[&hellip;]
147+
constexpr explicit(<i>see below</i>) basic_simd(const <ins><i>real-type</i></ins><del>V</del>&amp; reals, const <ins><i>real-type</i></ins><del>V</del>&amp; imags = {}) noexcept;
111148
</pre>
149+
<blockquote>
150+
<p>
151+
-19- <i>Constraints</i>:
152+
</p>
153+
<ol style="list-style-type: none">
154+
<li><p><del>(19.1) &mdash;</del> <code><i>simd-complex</i>&lt;basic_simd&gt;</code> is modeled<ins>.</ins><del>, and</del></p></li>
155+
<li><p><del>(19.2) &mdash; <code class='backtick'>V::size() == size()</code> is <code class='backtick'>true</code>.</del></p></li>
156+
</ol>
157+
<p>
158+
[&hellip;]
159+
<p/>
160+
-21- <i>Remarks</i>: The expression inside <code class='backtick'>explicit</code> evaluates to <code class='backtick'>false</code> if and only if the
161+
floating-point conversion rank of <code class='backtick'>T::value_type</code> is greater than or equal to the floating-point
162+
conversion rank of <code><ins><i>real-type</i></ins><del>V</del>::value_type</code>.
163+
</p>
164+
</blockquote>
112165
</blockquote>
113166
</li>
114167

115168
<li><p>Modify 99 [simd.complex.access] as indicated:</p>
116169

117170
<blockquote>
118171
<pre>
172+
constexpr <ins><i>real-type</i></ins><del>auto</del> real() const noexcept;
173+
constexpr <ins><i>real-type</i></ins><del>auto</del> imag() const noexcept;
174+
</pre>
175+
<blockquote>
176+
<p>
177+
-1- <i>Constraints</i>: <code><i>simd-complex</i>&lt;basic_simd&gt;</code> is modeled.
178+
<p/>
179+
-2- <i>Returns</i>: An object of type <code><ins><i>real-type</i></ins><del>rebind_t&lt;typename T::value_type, basic_simd&gt;</del></code>
180+
where the <code><i>i</i></code><sup>th</sup> element is initialized to the result of
181+
<code><i>cmplx-func</i>(operator[](<i>i</i>))</code> for all <code><i>i</i></code> in the range
182+
<code class='backtick'>[0, size())</code>, where <code><i>cmplx-func</i></code> is the corresponding function from
183+
<code>&lt;complex&gt;</code>.
184+
</p>
185+
</blockquote>
186+
<pre>
119187
<del>template&lt;<i>simd-floating-point</i> V&gt;</del>
120-
constexpr void real(<ins><i>see below</i></ins><del>const V&amp;</del> v) noexcept;
188+
constexpr void real(const <ins><i>real-type</i></ins><del>V</del>&amp; v) noexcept;
121189
<del>template&lt;<i>simd-floating-point</i> V&gt;</del>
122-
constexpr void imag(<ins><i>see below</i></ins><del>const V&amp;</del> v) noexcept;
190+
constexpr void imag(const <ins><i>real-type</i></ins><del>V</del>&amp; v) noexcept;
123191
</pre>
124192
<blockquote>
125193
<p>
@@ -131,13 +199,7 @@ <h3 id="4230"><a href="lwg-active.html#4230">4230</a>. <code>simd&lt;complex&gt;
131199
<li><p><del>(3.3) &mdash; <code class='backtick'>V::size() == size()</code> is <code class='backtick'>true</code>.</del></p></li>
132200
</ol>
133201
<p>
134-
-4- <i>Effects</i>: Replaces each element of the <code class='backtick'>basic_simd</code> object such that the <code><i>i</i></code><sup>th</sup>
135-
element is replaced with <code>value_type(v[<i>i</i>], operator[](<i>i</i>).imag())</code> or
136-
<code>value_type(operator[](<i>i</i>).real(), v[<i>i</i>])</code> for <code class='backtick'>real</code> and <code class='backtick'>imag</code> respectively,
137-
for all <code><i>i</i></code> in the range <code class='backtick'>[0, size())</code>.
138-
<p/>
139-
<ins>-?- <i>Remarks</i>: The type of argument <code class='backtick'>v</code> is
140-
<code>const rebind_t&lt;typename T::value_type, basic_simd&gt;&amp;</code>.</ins>
202+
[&hellip;]
141203
</p>
142204
</blockquote>
143205
</blockquote>

lwg-active.html

Lines changed: 80 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
</tr>
8080
</table>
8181
<h1>C++ Standard Library Active Issues List (Revision D125)</h1>
82-
<p>Revised 2025-03-22 at 14:18:18 UTC
82+
<p>Revised 2025-03-22 at 15:10:03 UTC
8383
</p>
8484
<p>Reference ISO/IEC IS 14882:2020(E)</p>
8585
<p>Also see:</p>
@@ -71775,7 +71775,18 @@ <h3 id="4230"><a href="#4230">4230</a><sup><a href="https://cplusplus.github.io/
7177571775
The design intent was to match the <code>std::complex&lt;T&gt;</code> interface. In which case
7177671776
the current wording doesn't match that intent. <code class='backtick'>complex</code> doesn't say <code>real(same_as&lt;T&gt; auto)</code>
7177771777
but 'real(T)', which allows conversions.
71778+
<p/>
71779+
This issue is also present in the <code class='backtick'>basic_simd(real, imag)</code> constructor. It deduces the type for the
71780+
real/imag arguments instead of using a dependent type derived from <code class='backtick'>value_type</code> and ABI tag.
7177871781
</p>
71782+
<blockquote><pre>
71783+
// OK:
71784+
complex&lt;double&gt; c{1., 1.f};
71785+
71786+
// <span style="color:red;font-weight:bolder">Ill-formed, should be allowed</span>:
71787+
simd&lt;complex&lt;double&gt;&gt; sc0(1., 1.);
71788+
simd&lt;complex&lt;double&gt;, 4&gt; sc1(simd&lt;double, 4&gt;(1.), simd&lt;float, 4&gt;(1.f));
71789+
</pre></blockquote>
7177971790

7178071791

7178171792
<p id="res-4230"><b>Proposed resolution:</b></p>
@@ -71789,27 +71800,84 @@ <h3 id="4230"><a href="#4230">4230</a><sup><a href="https://cplusplus.github.io/
7178971800

7179071801
<blockquote>
7179171802
<pre>
71792-
[&hellip;]
71793-
<i>// 99 [simd.complex.access], basic_simd complex-value accessors</i>
71794-
constexpr auto real() const noexcept;
71795-
constexpr auto imag() const noexcept;
71796-
<del>template&lt;<i>simd-floating-point</i> V&gt;</del>
71797-
constexpr void real(<ins><i>see below</i></ins><del>const V&amp;</del> v) noexcept;
71803+
namespace std::datapar {
71804+
template&lt;class T, class Abi&gt; class basic_simd {
71805+
public:
71806+
using value_type = T;
71807+
using mask_type = basic_simd_mask&lt;sizeof(T), Abi&gt;;
71808+
using abi_type = Abi;
71809+
71810+
<ins>using <i>real-type</i> = rebind_t&lt;typename T::value_type, basic_simd&gt; <i>// exposition-only</i></ins>
71811+
71812+
<i>// 29.10.6.2 <a href="https://wg21.link/simd.ctor">[simd.ctor]</a>, basic_simd constructors</i>
71813+
[&hellip;]
71814+
<del>template&lt;<i>simd-floating-point</i> V&gt;</del>
71815+
constexpr explicit(<i>see below</i>) basic_simd(const <ins><i>real-type</i></ins><del>V</del>&amp; reals, const <ins><i>real-type</i></ins><del>V</del>&amp; imags = {}) noexcept;
71816+
[&hellip;]
71817+
<i>// 99 [simd.complex.access], basic_simd complex-value accessors</i>
71818+
constexpr <ins><i>real-type</i></ins><del>auto</del> real() const noexcept;
71819+
constexpr <ins><i>real-type</i></ins><del>auto</del> imag() const noexcept;
71820+
<del>template&lt;<i>simd-floating-point</i> V&gt;</del>
71821+
constexpr void real(const <ins><i>real-type</i></ins><del>V</del>&amp; v) noexcept;
71822+
<del>template&lt;<i>simd-floating-point</i> V&gt;</del>
71823+
constexpr void imag(const <ins><i>real-type</i></ins><del>V</del>&amp; v) noexcept;
71824+
[&hellip;]
71825+
};
71826+
[&hellip;]
71827+
}
71828+
</pre>
71829+
</blockquote>
71830+
</li>
71831+
71832+
<li><p>Modify 29.10.6.2 <a href="https://wg21.link/simd.ctor">[simd.ctor]</a> as indicated:</p>
71833+
71834+
<blockquote>
71835+
<pre>
7179871836
<del>template&lt;<i>simd-floating-point</i> V&gt;</del>
71799-
constexpr void imag(<ins><i>see below</i></ins><del>const V&amp;</del> v) noexcept;
71800-
[&hellip;]
71837+
constexpr explicit(<i>see below</i>) basic_simd(const <ins><i>real-type</i></ins><del>V</del>&amp; reals, const <ins><i>real-type</i></ins><del>V</del>&amp; imags = {}) noexcept;
7180171838
</pre>
71839+
<blockquote>
71840+
<p>
71841+
-19- <i>Constraints</i>:
71842+
</p>
71843+
<ol style="list-style-type: none">
71844+
<li><p><del>(19.1) &mdash;</del> <code><i>simd-complex</i>&lt;basic_simd&gt;</code> is modeled<ins>.</ins><del>, and</del></p></li>
71845+
<li><p><del>(19.2) &mdash; <code class='backtick'>V::size() == size()</code> is <code class='backtick'>true</code>.</del></p></li>
71846+
</ol>
71847+
<p>
71848+
[&hellip;]
71849+
<p/>
71850+
-21- <i>Remarks</i>: The expression inside <code class='backtick'>explicit</code> evaluates to <code class='backtick'>false</code> if and only if the
71851+
floating-point conversion rank of <code class='backtick'>T::value_type</code> is greater than or equal to the floating-point
71852+
conversion rank of <code><ins><i>real-type</i></ins><del>V</del>::value_type</code>.
71853+
</p>
71854+
</blockquote>
7180271855
</blockquote>
7180371856
</li>
7180471857

7180571858
<li><p>Modify 99 [simd.complex.access] as indicated:</p>
7180671859

7180771860
<blockquote>
7180871861
<pre>
71862+
constexpr <ins><i>real-type</i></ins><del>auto</del> real() const noexcept;
71863+
constexpr <ins><i>real-type</i></ins><del>auto</del> imag() const noexcept;
71864+
</pre>
71865+
<blockquote>
71866+
<p>
71867+
-1- <i>Constraints</i>: <code><i>simd-complex</i>&lt;basic_simd&gt;</code> is modeled.
71868+
<p/>
71869+
-2- <i>Returns</i>: An object of type <code><ins><i>real-type</i></ins><del>rebind_t&lt;typename T::value_type, basic_simd&gt;</del></code>
71870+
where the <code><i>i</i></code><sup>th</sup> element is initialized to the result of
71871+
<code><i>cmplx-func</i>(operator[](<i>i</i>))</code> for all <code><i>i</i></code> in the range
71872+
<code class='backtick'>[0, size())</code>, where <code><i>cmplx-func</i></code> is the corresponding function from
71873+
<code>&lt;complex&gt;</code>.
71874+
</p>
71875+
</blockquote>
71876+
<pre>
7180971877
<del>template&lt;<i>simd-floating-point</i> V&gt;</del>
71810-
constexpr void real(<ins><i>see below</i></ins><del>const V&amp;</del> v) noexcept;
71878+
constexpr void real(const <ins><i>real-type</i></ins><del>V</del>&amp; v) noexcept;
7181171879
<del>template&lt;<i>simd-floating-point</i> V&gt;</del>
71812-
constexpr void imag(<ins><i>see below</i></ins><del>const V&amp;</del> v) noexcept;
71880+
constexpr void imag(const <ins><i>real-type</i></ins><del>V</del>&amp; v) noexcept;
7181371881
</pre>
7181471882
<blockquote>
7181571883
<p>
@@ -71821,13 +71889,7 @@ <h3 id="4230"><a href="#4230">4230</a><sup><a href="https://cplusplus.github.io/
7182171889
<li><p><del>(3.3) &mdash; <code class='backtick'>V::size() == size()</code> is <code class='backtick'>true</code>.</del></p></li>
7182271890
</ol>
7182371891
<p>
71824-
-4- <i>Effects</i>: Replaces each element of the <code class='backtick'>basic_simd</code> object such that the <code><i>i</i></code><sup>th</sup>
71825-
element is replaced with <code>value_type(v[<i>i</i>], operator[](<i>i</i>).imag())</code> or
71826-
<code>value_type(operator[](<i>i</i>).real(), v[<i>i</i>])</code> for <code class='backtick'>real</code> and <code class='backtick'>imag</code> respectively,
71827-
for all <code><i>i</i></code> in the range <code class='backtick'>[0, size())</code>.
71828-
<p/>
71829-
<ins>-?- <i>Remarks</i>: The type of argument <code class='backtick'>v</code> is
71830-
<code>const rebind_t&lt;typename T::value_type, basic_simd&gt;&amp;</code>.</ins>
71892+
[&hellip;]
7183171893
</p>
7183271894
</blockquote>
7183371895
</blockquote>

lwg-closed.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
</tr>
8080
</table>
8181
<h1>C++ Standard Library Closed Issues List (Revision D125)</h1>
82-
<p>Revised 2025-03-22 at 14:18:18 UTC
82+
<p>Revised 2025-03-22 at 15:10:03 UTC
8383
</p>
8484
<p>Reference ISO/IEC IS 14882:2020(E)</p>
8585
<p>Also see:</p>

lwg-defects.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
</tr>
8080
</table>
8181
<h1>C++ Standard Library Defect Reports and Accepted Issues (Revision D125)</h1>
82-
<p>Revised 2025-03-22 at 14:18:18 UTC
82+
<p>Revised 2025-03-22 at 15:10:03 UTC
8383
</p>
8484
<p>Reference ISO/IEC IS 14882:2020(E)</p>
8585
<p>Also see:</p>

lwg-immediate.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ <h1>C++ Standard Library Issues Resolved Directly In [INSERT CURRENT MEETING HER
6262
</tr>
6363
<tr>
6464
<td align="left">Date:</td>
65-
<td align="left">Revised 2025-03-22 at 14:18:18 UTC
65+
<td align="left">Revised 2025-03-22 at 15:10:03 UTC
6666
</td>
6767
</tr>
6868
<tr>

lwg-index-open.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ <h1>Index by Section</h1>
6666
<p>This document is the Index by Section for the <a href="lwg-active.html">Library Active Issues List</a>.</p>
6767
<h2>Index by Section (non-Ready active issues only)</h2>
6868
<p><a href="lwg-index.html">(view all issues)</a></p>
69-
<p>Revised 2025-03-22 at 14:18:18 UTC
69+
<p>Revised 2025-03-22 at 15:10:03 UTC
7070
</p><h2 id="Section_3">Section 3 (2 issues)</h2>
7171
<p><a href="lwg-index.html#Section_3">(view all issues)</a></p>
7272
<table class="issues-index">

lwg-index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ <h1>Index by Section</h1>
6666
<p>This document is the Index by Section for the <a href="lwg-active.html">Library Active Issues List</a>, <a href="lwg-defects.html">Library Defect Reports and Accepted Issues</a>, and <a href="lwg-closed.html">Library Closed Issues List</a>.</p>
6767
<h2>Index by Section</h2>
6868
<p><a href="lwg-index-open.html">(view only non-Ready open issues)</a></p>
69-
<p>Revised 2025-03-22 at 14:18:18 UTC
69+
<p>Revised 2025-03-22 at 15:10:03 UTC
7070
</p><h2 id="Section_2">Section 2 (2 issues)</h2>
7171
<table class="issues-index">
7272
<tr>

lwg-ready.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ <h1>C++ Standard Library Issues to be moved in [INSERT CURRENT MEETING HERE]</h1
6262
</tr>
6363
<tr>
6464
<td align="left">Date:</td>
65-
<td align="left">Revised 2025-03-22 at 14:18:18 UTC
65+
<td align="left">Revised 2025-03-22 at 15:10:03 UTC
6666
</td>
6767
</tr>
6868
<tr>

lwg-status-date.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ <h1>Index by Status and Date</h1>
6767
This document is the Index by Status and Date for the <a href="lwg-active.html">Library Active Issues List</a>,
6868
<a href="lwg-defects.html">Library Defect Reports and Accepted Issues</a>, and <a href="lwg-closed.html">Library Closed Issues List</a>.
6969
</p>
70-
<p>Revised 2025-03-22 at 14:18:18 UTC
70+
<p>Revised 2025-03-22 at 15:10:03 UTC
7171
</p><h2 id="Ready">Ready (7 issues)</h2>
7272
<table class="issues-index">
7373
<tr>

lwg-status.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ <h1>Index by Status and Section</h1>
6262
<a href="lwg-defects.html">Library Defect Reports and Accepted Issues</a>, and <a href="lwg-closed.html">Library Closed Issues List</a>.
6363
</p>
6464

65-
<p>Revised 2025-03-22 at 14:18:18 UTC
65+
<p>Revised 2025-03-22 at 15:10:03 UTC
6666
</p><h2 id="Ready">Ready (7 issues)</h2>
6767
<table class="issues-index">
6868
<tr>

0 commit comments

Comments
 (0)