This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Voting status.
constexpr-wrapper-like needs remove_cvref_t in simd::basic_vec
constructorSection: 29.10.7.2 [simd.ctor] Status: Voting Submitter: Hewill Kang Opened: 2025-10-05 Last modified: 2025-10-30
Priority: Not Prioritized
View other active issues in [simd.ctor].
View all other issues in [simd.ctor].
View all issues with Voting status.
Discussion:
decltype(From::value) would be const int& if From is a type of std::cw<42>,
so the reference also needs to be removed for checking the arithmetic type.
[2025-10-17; Reflector poll]
Set status to Tentatively Ready after seven votes in favour during reflector poll.
Proposed resolution:
This wording is relative to N5014.
Modify 29.10.7.2 [simd.ctor] as indicated:
template<class U> constexpr explicit(see below) basic_vec(U&& value) noexcept;-1- Let
[…] -4- Remarks: The expression insideFromdenote the typeremove_cvref_t<U>.explicitevaluates tofalseif and only ifUsatisfiesconvertible_to<value_type>, and either
(4.1) —
Fromis not an arithmetic type and does not satisfyconstexpr-wrapper-like,(4.2) —
Fromis an arithmetic type and the conversion fromFromtovalue_typeis value-preserving (29.10.1 [simd.general]), or(4.3) —
Fromsatisfiesconstexpr-wrapper-like,remove_cvref_tis an arithmetic type, andremove_const_t<decltype(From::value)>From::valueis representable byvalue_type.