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.
layout_stride::is_exhaustive specification is problematic when there's an extent equal to 1Section: 23.7.3.4.7.4 [mdspan.layout.stride.obs] Status: New Submitter: S. B. Tam Opened: 2026-03-29 Last modified: 2026-04-04
Priority: Not Prioritized
View all issues with New status.
Discussion:
Consider
constexpr std::extents ext{2, 1, 2};
constexpr std::array stride{1, 5, 2};
constexpr std::layout_stride::mapping lsm(ext, stride);
static_assert(lsm.is_exhaustive());
Implementations disagree on the result of lsm.is_exhaustive(): true on libstdc++ and libc++, false on MSVC STL.
false.
Should is_exhaustive be made to return true in this case (which is more correct and also easier to implement)?
Proposed resolution: