This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
deduce-abi-t is underspecified and incorrectly referenced
from rebind and resizeSection: 29.10.2.2 [simd.expos.abi], 29.10.4 [simd.traits] Status: New Submitter: Matthias Kretz Opened: 2025-10-15 Last modified: 2025-10-25
Priority: Not Prioritized
View all issues with New status.
Discussion:
In 29.10.2.2 [simd.expos.abi], deduce-abi-t is specified to be defined for some
arguments. For all remaining arguments, nothing is specified. This could be interpreted to make
such specializations ill-formed. But that does not match the intent of making
simd::vec<std::string>
and
simd::vec<int, INT_MAX>
disabled specializations of basic_vec. (If INT_MAX is not supported by the
implementation.)
rebind and resize say "deduce-abi-t<T, V::size()>
has a member type type". But that's not how deduce-abi-t is specified.
Previous resolution [SUPERSEDED]:
This wording is relative to N5014.
Modify 29.10.4 [simd.traits] as indicated:
template<class T, class V> struct rebind { using type = see below; };-4- The member
typeis present if and only if[…]
(4.1) —
Vis a data-parallel type,(4.2) —
Tis a vectorizable type, and(4.3) —
deduce-abi-t<T, V::size()>has a member typeis defined.typetemplate<simd-size-type N, class V> struct resize { using type = see below; };-7- Let
-8- The memberTdenote […]typeis present if and only if
(8.1) —
Vis a data-parallel type, and(8.2) —
deduce-abi-t<T, N>has a member typeis defined.type
[2025-10-21; Matthias Kretz improves discussion and proposed wording]
Proposed resolution:
This wording is relative to N5014.
Modify 29.10.2.2 [simd.expos.abi] as indicated:
template<class T> using native-abi = see below; template<class T, simd-size-type N> using deduce-abi-t = see below;-1- An ABI tag is a type that indicates a choice of size and binary representation for objects of data-parallel type.
[…] -3- An implementation defines ABI tag types as necessary for the following aliases. -4-deduce-abi-t<T, N>is definednames an ABI tag type if and only if
(4.1) —
Tis a vectorizable type,(4.2) —
Nis greater than zero, and(4.3) —
Nis not larger than an implementation-defined maximum.Otherwise,
The implementation-defined maximum fordeduce-abi-t<T, N>names an unspecified type.Nis not smaller than 64 and can differ depending onT. […] -5-Where present,Ifdeduce-abi-t<T, N>names an ABI tag typesuch that, the following istrue:
(5.1) —
simd-size-v<T, deduce-abi-t<T, N>>equalsN,(5.2) —
basic_vec<T, deduce-abi-t<T, N>>is enabled (29.10.7.1 [simd.overview]), and(5.3) —
basic_mask<sizeof(T), deduce-abi-t<integer-from<sizeof(T)>, N>>is enabled.
Modify 29.10.4 [simd.traits] as indicated:
template<class T, class V> struct rebind { using type = see below; };-4- The member
typeis present if and only if[…]
(4.1) —
Vis a data-parallel type,(4.2) —
Tis a vectorizable type, and(4.3) —
deduce-abi-t<T, V::size()>has a member typenames an ABI tag type.typetemplate<simd-size-type N, class V> struct resize { using type = see below; };-7- Let
-8- The memberTdenote […]typeis present if and only if
(8.1) —
Vis a data-parallel type, and(8.2) —
deduce-abi-t<T, N>has a member typenames an ABI tag type.type