-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
43 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,43 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright (c) Borislav Stanimirov | ||
SPDX-License-Identifier: MIT | ||
--> | ||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> | ||
<Type Name="itlib::expected<*,*>"> | ||
<!-- Optional with T& (this is first so the next one can override it if possible) --> | ||
<Intrinsic Optional="true" Name="has_val" Expression="!!m_value"/> | ||
<!-- Optional with a value type T --> | ||
<Intrinsic Optional="true" Name="has_val" Expression="m_has_value"/> | ||
<DisplayString Condition="has_val()">{{value = {m_value}}}</DisplayString> | ||
<DisplayString>{{error = {m_error}}}</DisplayString> | ||
<Expand> | ||
<Item Condition="has_val()" Name="value">m_value</Item> | ||
<Item Condition="!has_val()" Name="error">m_error</Item> | ||
</Expand> | ||
</Type> | ||
<Type Name="itlib::expected<*,void>"> | ||
<!-- Optional with T& (this is first so the next one can override it if possible) --> | ||
<Intrinsic Optional="true" Name="has_val" Expression="!!m_value"/> | ||
<!-- Optional with a value type T --> | ||
<Intrinsic Optional="true" Name="has_val" Expression="m_has_value"/> | ||
<DisplayString Condition="has_val()">{{value = {m_value}}}</DisplayString> | ||
<DisplayString>unexpected</DisplayString> | ||
<Expand> | ||
<Item Condition="has_val()" Name="value">m_value</Item> | ||
</Expand> | ||
</Type> | ||
<Type Name="itlib::expected<void,*>"> | ||
<!-- Optional with T& (this is first so the next one can override it if possible) --> | ||
<DisplayString Condition="m_has_value">expected</DisplayString> | ||
<DisplayString>{{error = {m_error}}}</DisplayString> | ||
<Expand> | ||
<Item Condition="!m_has_value" Name="error">m_error</Item> | ||
</Expand> | ||
</Type> | ||
<Type Name="itlib::expected<void,void>"> | ||
<!-- Optional with T& (this is first so the next one can override it if possible) --> | ||
<DisplayString Condition="m_has_value">expected</DisplayString> | ||
<DisplayString>unexpected</DisplayString> | ||
</Type> | ||
</AutoVisualizer> |