Skip to content

Commit b14c017

Browse files
committed
New issue from Tim Song: "simd::partial_load uses undefined identifier T"
1 parent 0e4258f commit b14c017

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

xml/issue4280.xml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4280" status="New">
5+
<title>`simd::partial_load` uses undefined identifier `T`</title>
6+
<section>
7+
<sref ref="[simd.loadstore]"/>
8+
</section>
9+
<submitter>Tim Song</submitter>
10+
<date>21 Jun 2025</date>
11+
<priority>99</priority>
12+
13+
<discussion>
14+
<p>
15+
The <i>Effects:</i> element of `std::simd::partial_load` (after the latest rename) uses `T`
16+
but that is not defined anywhere. It should be `V::value_type`.
17+
<p/>
18+
Also, this paragraph should be a <i>Returns:</i> element.
19+
</p>
20+
</discussion>
21+
22+
<resolution>
23+
<p>
24+
This wording is relative to <paper num="N5008"/>.
25+
</p>
26+
27+
<ol>
28+
<li><p>Modify <sref ref="[simd.loadstore]"/> as indicated:</p>
29+
30+
<blockquote>
31+
<pre><code>
32+
template&lt;class V = <i>see below</i>, ranges::contiguous_range R, class... Flags&gt;
33+
requires ranges::sized_range&lt;R&gt;
34+
constexpr V partial_load(R&amp;&amp; r, flags&lt;Flags...&gt; f = {});
35+
[&hellip;]
36+
template&lt;class V = <i>see below</i>, contiguous_iterator I, sized_sentinel_for&lt;I&gt; S, class... Flags&gt;
37+
constexpr V partial_load(I first, S last, const typename V::mask_type&amp; mask,
38+
flags&lt;Flags...&gt; f = {});
39+
</code></pre>
40+
<blockquote>
41+
<p>
42+
-6- [&hellip;]
43+
<p/>
44+
-7- <i>Mandates</i>: [&hellip;]
45+
<p/>
46+
-8- <i>Preconditions</i>: [&hellip;]
47+
<p/>
48+
-9- <del><i>Effects</i>: Initializes the</del><ins><i>Returns</i>: A `basic_simd` object
49+
whose</ins> <tt><i>i</i></tt><sup>th</sup> element <ins>is initialized</ins> with
50+
<tt>mask[<i>i</i>] &amp;&amp; <i>i</i> &lt; ranges::size(r) ? static_cast&lt;T&gt;(ranges::data(r)[<i>i</i>]) : T()</tt>
51+
for all <tt><i>i</i></tt> in the range of <tt>[0, V::size())</tt><ins>, where `T` is `V::value_type`</ins>.
52+
<p/>
53+
-10- <i>Remarks</i>: The default argument for template parameter `V` is <tt>basic_simd&lt;ranges::range_value_t&lt;R&gt;&gt;</tt>.
54+
</p>
55+
</blockquote>
56+
</blockquote>
57+
</li>
58+
59+
</ol>
60+
</resolution>
61+
62+
</issue>

0 commit comments

Comments
 (0)