Skip to content

Conversation

@vmichal
Copy link
Contributor

@vmichal vmichal commented Jan 16, 2026

Revisit natvis definitions for flat_meow: remove unnecessary special cases for flat_map without changing the visualization.

  • Use the same visualizer for flat_(multi)set
  • Remove all special cases for flat_map and merge them into a single definition.
  • Use the same visualizer for flat_(multi)map

Towards #5950

@vmichal vmichal requested a review from a team as a code owner January 16, 2026 01:25
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Jan 16, 2026
@StephanTLavavej StephanTLavavej added visualizer How the VS debugger displays STL types flat_meow C++23 container adaptors labels Jan 16, 2026
@github-project-automation github-project-automation bot moved this from Initial Review to Work In Progress in STL Code Reviews Jan 16, 2026
@vmichal
Copy link
Contributor Author

vmichal commented Jan 16, 2026

I have updated the fallback visualization of std::flat_(multi)map to at least show size, which calls _Data.keys.size() (there should be no problem parsing that, as we use it in our implementation).

Should the main visualization for std::flat_(multi)map fail, it would be more likely because of the use of operator[] on key and mapped containers. We don't actively use these functions in <flat_map>, so I can imagine a world where the user specializes std::flat_(multi)map with a container that lacks operator[] and has random-access iterators.

@vmichal
Copy link
Contributor Author

vmichal commented Jan 16, 2026

Just to clarify the intent of multiple PRs: The visualization of <flat_meow> data structures will additionally improve by accepting two other loosely related changes

These changes are self-contained, so I extracted them from feature branch and opened a PR to main. There are no adjacent-edit conflicts.

@StephanTLavavej StephanTLavavej self-assigned this Jan 16, 2026
@StephanTLavavej StephanTLavavej moved this from Work In Progress to Initial Review in STL Code Reviews Jan 16, 2026
@StephanTLavavej StephanTLavavej merged commit d86d691 into microsoft:feature/flat_map Jan 16, 2026
45 checks passed
@github-project-automation github-project-automation bot moved this from Initial Review to Done in STL Code Reviews Jan 16, 2026
@StephanTLavavej
Copy link
Member

Wonderful, thank you! 😻

@vmichal vmichal deleted the flat-meow-natvis branch January 16, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flat_meow C++23 container adaptors visualizer How the VS debugger displays STL types

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants