From f6a0e22fd1a4675ae569efabafe72bda9fe38c42 Mon Sep 17 00:00:00 2001 From: Abhinav Agarwal Date: Mon, 15 Jun 2026 22:11:51 -0700 Subject: [PATCH] [mdspan.sub.helpers] Fix swapped offset/extent in canonical-slice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The extent_slice branch of canonical-slice initializes .offset from s.extent and .extent from s.offset, reversing the intended mapping. This is inconsistent with canonical-range-slice and the pre-P3982R2 wording, both of which map offset → offset and extent → extent. --- source/containers.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index cd7efa59e8..6b18519bbd 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -25946,8 +25946,8 @@ return @\exposid{canonical-index}@(std::move(s)); } else if constexpr (@\exposconcept{is-extent-slice}@) { return extent_slice{ - .offset = @\exposid{canonical-index}@(std::move(s.extent)), - .extent = @\exposid{canonical-index}@(std::move(s.offset)), + .offset = @\exposid{canonical-index}@(std::move(s.offset)), + .extent = @\exposid{canonical-index}@(std::move(s.extent)), .stride = @\exposid{canonical-index}@(std::move(s.stride)) }; } else if constexpr (@\exposconcept{is-range-slice}@) {