Skip to content

STL.natvis: add layout_stride::mapping visualizer#6245

Open
JMazurkiewicz wants to merge 2 commits intomicrosoft:mainfrom
JMazurkiewicz:mdspan/layout_stride-visualizer
Open

STL.natvis: add layout_stride::mapping visualizer#6245
JMazurkiewicz wants to merge 2 commits intomicrosoft:mainfrom
JMazurkiewicz:mdspan/layout_stride-visualizer

Conversation

@JMazurkiewicz
Copy link
Copy Markdown
Contributor

Before:
before

After:
after

before-after code
#include <mdspan>

using namespace std;

int main() {
    using E1 = extents<int, 3>;
    layout_stride::mapping<E1> m1({}, array{ 2 });
    (void)m1.stride(0);

    using E2 = dextents<short, 2>;
    layout_stride::mapping<E2> m2(E2{ 3, 4 }, to_array<short>({ 5, 1 }));
    (void)m2.stride(1);

    using E3 = extents<size_t, 4, dynamic_extent, 6>;
    layout_stride::mapping<E3> m3(E3{ 5 }, to_array<size_t>({ 5, 1, 22 }));
    (void)m3.stride(2);
}

Also fixes indentation in extents's visualizer (added in #6053).

@JMazurkiewicz JMazurkiewicz requested a review from a team as a code owner April 10, 2026 13:49
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Apr 10, 2026
@StephanTLavavej StephanTLavavej added visualizer How the VS debugger displays STL types mdspan C++23 mdspan labels Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mdspan C++23 mdspan visualizer How the VS debugger displays STL types

Projects

Status: Initial Review

Development

Successfully merging this pull request may close these issues.

2 participants