• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3    This will make GitHub and some editors recognize this code as XML:
4    vim: syntax=xml
5-->
6<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
7    <!-- These types are from the gsl_assert header. -->
8    <Type Name="gsl::fail_fast">
9        <!-- na hides the address, otherwise it would appear as 0x.... "Message" -->
10        <DisplayString>{_Data._What,nasb}</DisplayString>
11    </Type>
12
13    <!-- These types are from the gsl_util header. -->
14    <Type Name="gsl::final_action&lt;*&gt;">
15        <DisplayString>{{ invoke = {invoke_}, action = {f_} }}</DisplayString>
16        <Expand>
17            <Item Name="[invoke]">invoke_</Item>
18            <Item Name="[callback]">f_</Item>
19        </Expand>
20    </Type>
21
22    <!-- These types are from the span header. -->
23    <!-- This is for dynamic_extent spans. -->
24    <Type Name="gsl::span&lt;*, -1&gt;">
25        <DisplayString>{{ extent = {storage_.size_} }}</DisplayString>
26        <Expand>
27            <ArrayItems>
28                <Size>storage_.size_</Size>
29                <ValuePointer>storage_.data_</ValuePointer>
30            </ArrayItems>
31        </Expand>
32    </Type>
33
34    <!-- This works for constexpr size spans. -->
35    <Type Name="gsl::span&lt;*, *&gt;">
36        <DisplayString>{{ extent = {extent} }}</DisplayString>
37        <Expand>
38            <ArrayItems>
39                <Size>extent</Size>
40                <ValuePointer>storage_.data_</ValuePointer>
41            </ArrayItems>
42        </Expand>
43    </Type>
44
45    <!-- This is for dynamic_extent string_spans. -->
46    <Type Name="gsl::basic_string_span&lt;*, -1&gt;">
47        <DisplayString>{span_.storage_.data_,[span_.storage_.size_]na}</DisplayString>
48        <Expand>
49            <Item Name="[size]">span_.storage_.size_</Item>
50            <ArrayItems>
51                <Size>span_.storage_.size_</Size>
52                <ValuePointer>span_.storage_.data_</ValuePointer>
53            </ArrayItems>
54        </Expand>
55    </Type>
56
57    <!-- This works for constexpr size string_spans. -->
58    <Type Name="gsl::basic_string_span&lt;*, *&gt;">
59        <DisplayString>{span_.storage_.data_,[span_.extent]na}</DisplayString>
60        <Expand>
61            <Item Name="[size]">span_.extent</Item>
62            <ArrayItems>
63                <Size>span_.extent</Size>
64                <ValuePointer>span_.storage_.data_</ValuePointer>
65            </ArrayItems>
66        </Expand>
67    </Type>
68
69    <!-- This is for dynamic_extent zstring_spans. -->
70    <Type Name="gsl::basic_zstring_span&lt;*, -1&gt;">
71        <DisplayString>{span_.storage_.data_,[span_.storage_.size_]na}</DisplayString>
72        <Expand>
73            <Item Name="[size]">span_.storage_.size_</Item>
74            <ArrayItems>
75                <Size>span_.storage_.size_</Size>
76                <ValuePointer>span_.storage_.data_</ValuePointer>
77            </ArrayItems>
78        </Expand>
79    </Type>
80
81    <!-- This works for constexpr size string_spans. -->
82    <Type Name="gsl::basic_zstring_span&lt;*, *&gt;">
83        <DisplayString>{span_.storage_.data_,[span_.extent]na}</DisplayString>
84        <Expand>
85            <Item Name="[size]">span_.extent</Item>
86            <ArrayItems>
87                <Size>span_.extent</Size>
88                <ValuePointer>span_.storage_.data_</ValuePointer>
89            </ArrayItems>
90        </Expand>
91    </Type>
92
93    <!-- These types are from the gsl header. -->
94    <Type Name="gsl::not_null&lt;*&gt;">
95        <!-- We can always dereference this since it's an invariant. -->
96        <DisplayString>value = {*ptr_}</DisplayString>
97    </Type>
98</AutoVisualizer>
99