Skip to content

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

Open
Jakub Mazurkiewicz (JMazurkiewicz) wants to merge 2 commits into
microsoft:mainfrom
JMazurkiewicz:mdspan/layout_stride-visualizer
Open

Jakub Mazurkiewicz (JMazurkiewicz) wants to merge 2 commits into
microsoft: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).

@github-project-automation github-project-automation Bot moved this to Initial Review in STL Code Reviews Apr 10, 2026
@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) added visualizer How the VS debugger displays STL types mdspan C++23 mdspan labels Apr 10, 2026

This branch has not been deployed

No deployments
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