22<!DOCTYPE issue SYSTEM "lwg-issue.dtd">
33
44<issue num =" 4414" status =" New" >
5- <title >§ [simd.traits] `rebind` and `resize` reference a `type` member that doesn't exist</title >
6- <section ><sref ref =" [simd.traits]" /></section >
5+ <title >§ [simd.expos.abi] <tt ><i >deduce-abi-t</i ></tt > is underspecified and incorrectly referenced
6+ from `rebind` and `resize`</title >
7+ <section ><sref ref =" [simd.expos.abi]" /><sref ref =" [simd.traits]" /></section >
78<submitter >Matthias Kretz</submitter >
89<date >15 Oct 2025</date >
910<priority >99</priority >
1011
1112<discussion >
1213<p >
13- In <sref ref =" [simd.traits ]" /> `rebind` and `resize` say " <tt ><i >deduce-abi-t</i >< T, V::size() > </tt >
14- has a member type `type`". But < tt >< i >deduce-abi-t</ i ></ tt > is specified in
15- < sref ref = " [simd.expos.abi] " /> p4-5 as an alias that is either defined or not.
14+ In <sref ref =" [simd.expos.abi ]" />, <tt ><i >deduce-abi-t</i ></tt > is specified to be defined for some
15+ arguments. For all remaining arguments, nothing is specified. This could be interpreted to make
16+ such specializations ill-formed. But that does not match the intent of making
1617</p >
18+ <blockquote ><pre >
19+ simd::vec< std::string>
20+ </pre ></blockquote >
21+ <p >
22+ and
23+ </p >
24+ <blockquote ><pre >
25+ simd::vec< int, INT_MAX>
26+ </pre ></blockquote >
27+ <p >
28+ disabled specializations of `basic_vec`. (If `INT_MAX` is not supported by the
29+ implementation.)
30+ <p />
31+ The wording needs to clarify what happens in those cases.
32+ <p />
33+ In <sref ref =" [simd.traits]" />, `rebind` and `resize` say "<tt ><i >deduce-abi-t</i >< T, V::size()> </tt >
34+ has a member type `type`". But that's not how <tt ><i >deduce-abi-t</i ></tt > is specified.
35+ </p >
36+ <superseded >
37+ <p >
38+ This wording is relative to <paper num =" N5014" />.
39+ </p >
40+
41+ <ol >
42+ <li ><p >Modify <sref ref =" [simd.traits]" /> as indicated:</p >
43+
44+ <blockquote >
45+ <pre >
46+ template< class T, class V> struct rebind { using type = <i >see below</i >; };
47+ </pre >
48+ <blockquote >
49+ <p >
50+ -4- The member `type` is present if and only if
51+ </p >
52+ <ol style =" list-style-type: none" >
53+ <li ><p >
54+ (4.1) — `V` is a data-parallel type,
55+ </p ></li >
56+ <li ><p >
57+ (4.2) — `T` is a vectorizable type, and
58+ </p ></li >
59+ <li ><p >
60+ (4.3) — <tt ><i >deduce-abi-t</i >< T, V::size()> </tt > <del >has a member type `type`</del >
61+ <ins >is defined</ins >.
62+ </p ></li >
63+ </ol >
64+ [… ]
65+ </blockquote >
66+ <pre >
67+ template< <i >simd-size-type</i > N, class V> struct resize { using type = <i >see below</i >; };
68+ </pre >
69+ <blockquote >
70+ <p >
71+ -7- Let `T` denote [… ]
72+ <p />
73+ -8- The member `type` is present if and only if
74+ </p >
75+ <ol style =" list-style-type: none" >
76+ <li ><p >
77+ (8.1) — `V` is a data-parallel type, and
78+ </p ></li >
79+ <li ><p >
80+ (8.2) — <tt ><i >deduce-abi-t</i >< T, N> </tt > <del >has a member type `type`</del >
81+ <ins >is defined</ins >.
82+ </p ></li >
83+ </ol >
84+ </blockquote >
85+ </blockquote >
86+ </li >
87+ </ol >
88+ </superseded >
89+
90+ <note >2025-10-21; Matthias Kretz improves discussion and proposed wording</note >
1791</discussion >
1892
1993<resolution >
@@ -22,6 +96,62 @@ This wording is relative to <paper num="N5014"/>.
2296</p >
2397
2498<ol >
99+ <li ><p >Modify <sref ref =" [simd.expos.abi]" /> as indicated:</p >
100+
101+ <blockquote >
102+ <pre >
103+ template< class T> using <i >native-abi</i > = <i >see below</i >;
104+ template< class T, <i >simd-size-type</i > N> using <i >deduce-abi-t</i > = <i >see below</i >;
105+ </pre >
106+ <blockquote >
107+ <p >
108+ -1- An <i >ABI tag</i > is a type that indicates a choice of size and binary representation for objects of data-parallel
109+ type.
110+ <p />
111+ [… ]
112+ <p />
113+ -3- An implementation defines ABI tag types as necessary for the following aliases.
114+ <p />
115+ -4- <tt ><i >deduce-abi-t</i >< T, N> </tt > <del >is defined</del ><ins >names an ABI tag type if and
116+ only</ins > if
117+ </p >
118+ <ol style =" list-style-type: none" >
119+ <li ><p >
120+ (4.1) — `T` is a vectorizable type,
121+ </p ></li >
122+ <li ><p >
123+ (4.2) — `N` is greater than zero, and
124+ </p ></li >
125+ <li ><p >
126+ (4.3) — `N` is not larger than an implementation-defined maximum.
127+ </p ></li >
128+ </ol >
129+ <p >
130+ <ins >Otherwise, <tt ><i >deduce-abi-t</i >< T, N> </tt > names an unspecified type.</ins >
131+ <p />
132+ The implementation-defined maximum for `N` is not smaller than 64 and can differ depending on `T`.
133+ [… ]
134+ <p />
135+ -5- <del >Where present,</del ><ins >If</ins > <tt ><i >deduce-abi-t</i >< T, N> </tt > names an ABI
136+ tag type <del >such that</del ><ins >, the following is `true`:</ins >
137+ </p >
138+ <ol style =" list-style-type: none" >
139+ <li ><p >
140+ (5.1) — <tt ><i >simd-size-v</i >< T, <i >deduce-abi-t</i >< T, N>> </tt > equals `N`,
141+ </p ></li >
142+ <li ><p >
143+ (5.2) — <tt >basic_vec< T, <i >deduce-abi-t</i >< T, N>> </tt > is enabled
144+ (<sref ref =" [simd.overview]" />), and
145+ </p ></li >
146+ <li ><p >
147+ (5.3) — <tt >basic_mask< sizeof(T), <i >deduce-abi-t</i >< <i >integer-from</i >< sizeof(T)> , N>> </tt >
148+ is enabled.
149+ </p ></li >
150+ </ol >
151+ </blockquote >
152+ </blockquote >
153+ </li >
154+
25155<li ><p >Modify <sref ref =" [simd.traits]" /> as indicated:</p >
26156
27157<blockquote >
@@ -41,7 +171,7 @@ template<class T, class V> struct rebind { using type = <i>see below</i>;
41171</p ></li >
42172<li ><p >
43173(4.3) — <tt ><i >deduce-abi-t</i >< T, V::size()> </tt > <del >has a member type `type`</del >
44- <ins >is defined </ins >.
174+ <ins >names an ABI tag type </ins >.
45175</p ></li >
46176</ol >
47177[… ]
@@ -61,7 +191,7 @@ template<<i>simd-size-type</i> N, class V> struct resize { using type = <i
61191</p ></li >
62192<li ><p >
63193(8.2) — <tt ><i >deduce-abi-t</i >< T, N> </tt > <del >has a member type `type`</del >
64- <ins >is defined </ins >.
194+ <ins >names an ABI tag type </ins >.
65195</p ></li >
66196</ol >
67197</blockquote >
0 commit comments