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.

4392. simd::unchecked_load misses difference type casting

Section: 29.10.8.7 [simd.loadstore] Status: New Submitter: Hewill Kang Opened: 2025-09-29 Last modified: 2025-10-03

Priority: Not Prioritized

View other active issues in [simd.loadstore].

View all other issues in [simd.loadstore].

View all issues with New status.

Discussion:

Currently, simd::unchecked_load/partial_load/unchecked_store/partial_store construct a span via span(first, n) when taking an iterator first and its difference type n.

However, the construction is ill-formed when the difference type is an integer-class type; we should perform an explicit casting here.

Proposed resolution:

This wording is relative to N5014.

  1. In subclause 29.10.8.7 [simd.loadstore] replace all occurrences of

    R(first, n)
    

    by

    R(first, static_cast<size_t>(n))