Skip to content

Commit 3b8c13c

Browse files
committed
New issue from Hewill: "simd::unchecked_load misses difference type casting"
1 parent fd74a9f commit 3b8c13c

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

xml/issue4392.xml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version='1.0' encoding='utf-8' standalone='no'?>
2+
<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+
<issue num="4392" status="New">
5+
<title>`simd::unchecked_load` misses difference type casting</title>
6+
<section><sref ref="[simd.loadstore]"/></section>
7+
<submitter>Hewill Kang</submitter>
8+
<date>29 Sep 2025</date>
9+
<priority>99</priority>
10+
11+
<discussion>
12+
<p>
13+
Currently, `simd::unchecked_load`/`partial_load`/`unchecked_store`/`partial_store` construct a
14+
`span` via `span(first, n)` when taking an iterator `first` and its difference type `n`.
15+
<p/>
16+
However, the construction is ill-formed when the difference type is an integer-class type; we should perform
17+
an explicit casting here.
18+
</p>
19+
</discussion>
20+
21+
<resolution>
22+
<p>
23+
This wording is relative to <paper num="N5014"/>.
24+
</p>
25+
26+
<ol>
27+
28+
29+
<li><p>In subclause <sref ref="[simd.loadstore]"/> replace all occurrences of
30+
</p>
31+
<blockquote><pre>
32+
R(first, n)
33+
</pre></blockquote>
34+
<p>
35+
by
36+
</p>
37+
<blockquote><pre>
38+
R(first, <ins>static_cast&lt;size_t&gt;(</ins>n<ins>)</ins>)
39+
</pre></blockquote>
40+
</li>
41+
</ol>
42+
43+
</resolution>
44+
45+
</issue>

0 commit comments

Comments
 (0)