forked from microsoft/GSL
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Visual Studio Native Visualiser support file.
- Loading branch information
1 parent
897cc48
commit 0ed032f
Showing
1 changed file
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
This will make GitHub and some editors recognize this code as XML: | ||
vim: syntax=xml | ||
--> | ||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> | ||
<!-- These types are from the gsl_assert header. --> | ||
<Type Name="gsl::fail_fast"> | ||
<!-- na hides the address, otherwise it would appear as 0x.... "Message" --> | ||
<DisplayString>{_Data._What,nasb}</DisplayString> | ||
</Type> | ||
|
||
<!-- These types are from the gsl_util header. --> | ||
<Type Name="gsl::final_act<*>"> | ||
<DisplayString>{{ invoke = {invoke_}, action = {f_} }}</DisplayString> | ||
<Expand> | ||
<Item Name="[invoke]">invoke_</Item> | ||
<Item Name="[callback]">f_</Item> | ||
</Expand> | ||
</Type> | ||
|
||
<!-- These types are from the span header. --> | ||
<!-- This is for dynamic_extent spans. --> | ||
<Type Name="gsl::span<*, -1>"> | ||
<DisplayString>{{ extent = {storage_.size_} }}</DisplayString> | ||
<Expand> | ||
<ArrayItems> | ||
<Size>storage_.size_</Size> | ||
<ValuePointer>storage_.data_</ValuePointer> | ||
</ArrayItems> | ||
</Expand> | ||
</Type> | ||
|
||
<!-- This works for constexpr size spans. --> | ||
<Type Name="gsl::span<*, *>"> | ||
<DisplayString>{{ extent = {extent} }}</DisplayString> | ||
<Expand> | ||
<ArrayItems> | ||
<Size>extent</Size> | ||
<ValuePointer>storage_.data_</ValuePointer> | ||
</ArrayItems> | ||
</Expand> | ||
</Type> | ||
|
||
<!-- This is for dynamic_extent string_spans. --> | ||
<Type Name="gsl::basic_string_span<*, -1>"> | ||
<DisplayString>{span_.storage_.data_,[span_.storage_.size_]na}</DisplayString> | ||
<Expand> | ||
<Item Name="[size]">span_.storage_.size_</Item> | ||
<ArrayItems> | ||
<Size>span_.storage_.size_</Size> | ||
<ValuePointer>span_.storage_.data_</ValuePointer> | ||
</ArrayItems> | ||
</Expand> | ||
</Type> | ||
|
||
<!-- This works for constexpr size string_spans. --> | ||
<Type Name="gsl::basic_string_span<*, *>"> | ||
<DisplayString>{span_.storage_.data_,[span_.extent]na}</DisplayString> | ||
<Expand> | ||
<Item Name="[size]">span_.extent</Item> | ||
<ArrayItems> | ||
<Size>span_.extent</Size> | ||
<ValuePointer>span_.storage_.data_</ValuePointer> | ||
</ArrayItems> | ||
</Expand> | ||
</Type> | ||
|
||
<!-- This is for dynamic_extent zstring_spans. --> | ||
<Type Name="gsl::basic_zstring_span<*, -1>"> | ||
<DisplayString>{span_.storage_.data_,[span_.storage_.size_]na}</DisplayString> | ||
<Expand> | ||
<Item Name="[size]">span_.storage_.size_</Item> | ||
<ArrayItems> | ||
<Size>span_.storage_.size_</Size> | ||
<ValuePointer>span_.storage_.data_</ValuePointer> | ||
</ArrayItems> | ||
</Expand> | ||
</Type> | ||
|
||
<!-- This works for constexpr size string_spans. --> | ||
<Type Name="gsl::basic_zstring_span<*, *>"> | ||
<DisplayString>{span_.storage_.data_,[span_.extent]na}</DisplayString> | ||
<Expand> | ||
<Item Name="[size]">span_.extent</Item> | ||
<ArrayItems> | ||
<Size>span_.extent</Size> | ||
<ValuePointer>span_.storage_.data_</ValuePointer> | ||
</ArrayItems> | ||
</Expand> | ||
</Type> | ||
|
||
<!-- These types are from the gsl header. --> | ||
<Type Name="gsl::not_null<*>"> | ||
<!-- We can always dereference this since it's an invariant. --> | ||
<DisplayString>value = {*ptr_}</DisplayString> | ||
</Type> | ||
</AutoVisualizer> |