Created on 2026-03-29.00:00:00 last changed 2 weeks ago
Proposed resolution:
This wording is relative to N5008.
Modify [mdspan.layout.stride.obs] as indicated:
constexpr bool is_exhaustive() const noexcept;-5- Returns: required_span_size() == extents().fwd-prod-of-extents(rank_).
(5.1) — `true` if rank_ or the size of the multidimensional index space `m.extents()` is `0`.
(5.2) — Otherwise, true if there is a permutation P of the integers in the range [0, rank_) such that stride(p0) equals 1, and stride(pi) equals stride(pi−1) * extents().extent(pi−1) for i in the range [1, rank_), where pi is the ith element of P.
(5.3) — Otherwise, false.
[ Brno 2026-06-11; Change status: New → Ready. ]
[ 2026-06-10; Tomasz provides new wording ]
Reflect implementation in the wording.
[ 2026-05-29; Reflector poll. ]
Set priority to 3 after reflector poll.
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.
github.com/microsoft/STL/#5477 claims that the mapping is exhaustive in this case, but [mdspan.layout.stride.obs]/6.2 requires this function to return `false`. Should `is_exhaustive` be made to return `true` in this case (which is more correct and also easier to implement)?| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2026-06-11 13:08:06 | admin | set | messages: + msg16425 |
| 2026-06-11 13:08:06 | admin | set | status: new -> ready |
| 2026-06-10 22:58:05 | admin | set | messages: + msg16423 |
| 2026-06-10 22:58:05 | admin | set | messages: + msg16422 |
| 2026-05-29 08:44:59 | admin | set | messages: + msg16331 |
| 2026-03-29 00:00:00 | admin | create | |