Skip to content

Commit

Permalink
fix hash_* visualizer issue (microsoft#2784)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsb4000 committed Aug 13, 2022
1 parent 9d861c6 commit f77de88
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions stl/debugger/STL.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -1443,15 +1443,26 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
</Expand>
</Type>

<!-- VC 2015 - must have higher priority -->
<Type Name="stdext::hash_map&lt;*&gt;" Priority="Medium">
<AlternativeType Name="stdext::hash_multimap&lt;*&gt;" />
<AlternativeType Name="stdext::hash_set&lt;*&gt;" />
<AlternativeType Name="stdext::hash_multiset&lt;*&gt;" />
<DisplayString>{_List}</DisplayString>
<Expand>
<Item Name="[bucket_count]" IncludeView="detailed">_Maxidx</Item>
<Item Name="[load_factor]" IncludeView="detailed">((float)_List._Mypair._Myval2._Mysize) / ((float)_Maxidx)</Item>
<Item Name="[max_load_factor]" IncludeView="detailed">_Traitsobj._Max_buckets</Item>
<Item Name="[allocator]" ExcludeView="simple">_List._Mypair</Item>
<ExpandedItem>_List,view(simple)</ExpandedItem>
</Expand>
</Type>

<!-- VC 2015 - must have higher priority -->
<Type Name="std::unordered_map&lt;*&gt;" Priority="Medium">
<AlternativeType Name="std::unordered_multimap&lt;*&gt;" />
<AlternativeType Name="std::unordered_set&lt;*&gt;" />
<AlternativeType Name="std::unordered_multiset&lt;*&gt;" />
<AlternativeType Name="stdext::hash_map&lt;*&gt;" />
<AlternativeType Name="stdext::hash_multimap&lt;*&gt;" />
<AlternativeType Name="stdext::hash_set&lt;*&gt;" />
<AlternativeType Name="stdext::hash_multiset&lt;*&gt;" />
<DisplayString>{_List}</DisplayString>
<Expand>
<Item Name="[bucket_count]" IncludeView="detailed">_Maxidx</Item>
Expand Down

0 comments on commit f77de88

Please sign in to comment.