This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Ready status.

4588. mdspan issue due to rewording for canonicalize slice

Section: 23.7.3.7.1 [mdspan.sub.overview] Status: Ready Submitter: Christian Trott Opened: 2026-06-09 Last modified: 2026-06-12

Priority: Not Prioritized

View all issues with Ready status.

Discussion:

There is an oversight in paragraph 8 of 23.7.3.7.1 [mdspan.sub.overview] dynamic_extent. This is plainly an oversight and can be corrected by introducing a new 8.1 paragraph:

S is E::index_type or full_extent_t, otherwise

If S is index_type (i.e. a runtime value) no further condition on the validity of the type exists, and if it is full_extent_t, it is trivially a valid slice specifier type.

Note that a constant integral argument (constant_wrapper) is handled at the end in current paragraph 8.2.

Note furthermore that, S is already a slice specifier after canonicalization in this paragraph (or rather in the context where "valid slice specifier type" is used), hence we don't need to consider types convertible to things like full_extent_t or index_type.

[Brno 2026-06-11; Change status: New → Ready.]

Proposed resolution:

This wording is relative to N5046.

  1. Modify 23.7.3.7.1 [mdspan.sub.overview] as indicated:

    -8- Given a type E that is a specialization of extents, a type S is a valid submdspan slice type for the kth extent of E if S is a canonical slice type for E::index_type, and for x equal to E::static_extent(k), either x is equal to dynamic_extent; or

    1. (8.?) — S is E::index_type or full_extent_t, or
    2. (8.1) — if S is a specialization of extent_slice, then […]