Skip to content

Commit 836f5cd

Browse files
author
Julian LALU
committed
Add Natvs for compressed_pair
1 parent e64a0fa commit 836f5cd

2 files changed

Lines changed: 202 additions & 76 deletions

File tree

core.natvis

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
3+
<!-- hud::memory_allocation<T> -->
4+
<Type Name="hud::memory_allocation&lt;*&gt;">
5+
<DisplayString>{{Size = { end_ptr - begin_ptr }}}</DisplayString>
6+
<Expand>
7+
<Item Name="Size">end_ptr - begin_ptr</Item>
8+
<ArrayItems>
9+
<Size> end_ptr - begin_ptr </Size>
10+
<ValuePointer> begin_ptr </ValuePointer>
11+
</ArrayItems>
12+
</Expand>
13+
</Type>
14+
<!-- hud::optional<T> -->
15+
<Type Name="hud::optional&lt;*&gt;">
16+
<DisplayString Condition="some == true">Value: {some_value}</DisplayString>
17+
<DisplayString Condition="some == false">None</DisplayString>
18+
</Type>
19+
20+
<!-- hud::compressed_pair<F,S> -->
21+
<Type Name="hud::details::compressed_pair::compress_pair_impl&lt;*, *, 0,0&gt;">
22+
<DisplayString>({this-&gt;type_1_}, {this-&gt;type_2_})</DisplayString>
23+
<Expand>
24+
<Item Name="first">type_1_</Item>
25+
<Item Name="second">type_2_</Item>
26+
</Expand>
27+
</Type>
28+
<Type Name="hud::details::compressed_pair::compress_pair_impl&lt;*, *, 1,0&gt;">
29+
<DisplayString>({*($T1*)this}, {this-&gt;type_2_})</DisplayString>
30+
<Expand>
31+
<Item Name="first">($T1*)this</Item>
32+
<Item Name="second">type_2_</Item>
33+
</Expand>
34+
</Type>
35+
<Type Name="hud::details::compressed_pair::compress_pair_impl&lt;*, *, 0,1&gt;">
36+
<DisplayString>({{this-&gt;type_1_}, *($T2*)this})</DisplayString>
37+
<Expand>
38+
<Item Name="first">type_1_</Item>
39+
<Item Name="second">($T2*)this</Item>
40+
</Expand>
41+
</Type>
42+
<Type Name="hud::details::compressed_pair::compress_pair_impl&lt;*, *, 1,1&gt;">
43+
<DisplayString>({*($T1*)this}, *($T2*)this})</DisplayString>
44+
<Expand>
45+
<Item Name="first">($T1*)this</Item>
46+
<Item Name="second">($T2*)this</Item>
47+
</Expand>
48+
</Type>
49+
<!-- hud::vector<T> -->
50+
<!-- <Type Name="hud::vector&lt;*&gt;">
51+
<DisplayString>{{Size = { end_ptr - begin_ptr }}}</DisplayString>
52+
<Expand>
53+
<Item Name="Size">end_ptr - begin_ptr</Item>
54+
<ArrayItems>
55+
<Size> end_ptr - begin_ptr </Size>
56+
<ValuePointer> begin_ptr </ValuePointer>
57+
</ArrayItems>
58+
</Expand>
59+
</Type> -->
60+
</AutoVisualizer>

0 commit comments

Comments
 (0)