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.
simd::partial_load
uses undefined identifier T
Section: 29.10.7.7 [simd.loadstore] Status: New Submitter: Tim Song Opened: 2025-06-21 Last modified: 2025-06-21
Priority: Not Prioritized
View all issues with New status.
Discussion:
The Effects: element of std::simd::partial_load
(after the latest rename) uses T
but that is not defined anywhere. It should be V::value_type
.
Proposed resolution:
This wording is relative to N5008.
Modify 29.10.7.7 [simd.loadstore] as indicated:
template<class V = see below, ranges::contiguous_range R, class... Flags> requires ranges::sized_range<R> constexpr V partial_load(R&& r, flags<Flags...> f = {}); […] template<class V = see below, contiguous_iterator I, sized_sentinel_for<I> S, class... Flags> constexpr V partial_load(I first, S last, const typename V::mask_type& mask, flags<Flags...> f = {});
-6- […]
-7- Mandates: […] -8- Preconditions: […] -9-Effects: Initializes theReturns: Abasic_simd
object whosei
th element is initialized withmask[i] && i < ranges::size(r) ? static_cast<T>(ranges::data(r)[i]) : T()
for alli
in the range of[0, V::size())
, whereT
isV::value_type
. -10- Remarks: The default argument for template parameterV
isbasic_simd<ranges::range_value_t<R>>
.