Skip to content

[mdspan.sub.helpers] Fix swapped offset/extent in canonical-slice#9139

Open
abhinavagarwal07 wants to merge 1 commit into
cplusplus:mainfrom
abhinavagarwal07:fix-canonical-slice-extent-swap
Open

[mdspan.sub.helpers] Fix swapped offset/extent in canonical-slice#9139
abhinavagarwal07 wants to merge 1 commit into
cplusplus:mainfrom
abhinavagarwal07:fix-canonical-slice-extent-swap

Conversation

@abhinavagarwal07

Copy link
Copy Markdown
Contributor

The extent_slice branch of canonical-slice ([mdspan.sub.helpers]) 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.

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.
@eisenwave

Copy link
Copy Markdown
Member

I'm not sure whether this is editorial. https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3982r2.html does have this problem.

Does this require an LWG issue or can we treat this as an obvious typo @jwakely

@eisenwave eisenwave added the P1-Important Misapplication of paper, malformed code, internal inconsistencies label Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P1-Important Misapplication of paper, malformed code, internal inconsistencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants