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
@abhinavagarwal07

Copy link
Copy Markdown
Contributor Author

Happy to file LWG if its more appropriate.

@jwakely

jwakely commented Jun 16, 2026

Copy link
Copy Markdown
Member

Problems with the presentation of the specification, which, when fixed, would not alter the (intended) meaning of the specification. Typos and obvious inconsistencies fall into this category.

https://github.com/cplusplus/draft/wiki/How-to-tell-if-an-issue-is-editorial

This seems clearly editorial, the intended meaning is to initialize the offset with the offset and the extent with the extent.

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.

3 participants