Merge branch 'develop' of https://github.com/vinniefalco/boost-variant2 into feature/pr-36

This commit is contained in:
Peter Dimov
2023-01-13 00:55:17 +02:00
2 changed files with 39 additions and 0 deletions

View File

@ -19,6 +19,13 @@ target_link_libraries(boost_variant2
Boost::mp11
)
file(GLOB_RECURSE boost_variant2_IDEFILES CONFIGURE_DEPENDS include/*.hpp)
source_group(TREE ${PROJECT_SOURCE_DIR}/include FILES ${boost_variant2_IDEFILES})
if (CMAKE_GENERATOR MATCHES "Visual Studio")
list(APPEND boost_variant2_IDEFILES extra/boost_variant2.natvis)
endif()
target_sources(boost_variant2 PRIVATE ${boost_variant2_IDEFILES})
target_compile_features(boost_variant2 INTERFACE cxx_std_11)
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="boost::variant2::detail::variant_ma_base_impl&lt;*&gt;" Inheritable="true">
<Intrinsic Name="index" Expression="$T2==1?((int)ix_-1):((int)((ix_-2)/2))"/>
<DisplayString Condition="index()==0&amp;&amp;$T2==1" Optional="true">{st_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==1&amp;&amp;$T2==1" Optional="true">{st_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==2&amp;&amp;$T2==1" Optional="true">{st_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==3&amp;&amp;$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==4&amp;&amp;$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==5&amp;&amp;$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==6&amp;&amp;$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==7&amp;&amp;$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==8&amp;&amp;$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==9&amp;&amp;$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==0&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==1&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==2&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==3&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==4&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==5&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==6&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==7&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==8&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==9&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<Expand>
<Item Name="[index]">index()</Item>
<Item Name="ix_">ix_</Item>
</Expand>
</Type>
</AutoVisualizer>