mirror of
https://github.com/boostorg/variant2.git
synced 2025-07-29 19:57:18 +02:00
Merge branch 'develop' of https://github.com/vinniefalco/boost-variant2 into feature/pr-36
This commit is contained in:
@ -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")
|
||||
|
32
extra/boost_variant2.natvis
Normal file
32
extra/boost_variant2.natvis
Normal 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<*>" Inheritable="true">
|
||||
<Intrinsic Name="index" Expression="$T2==1?((int)ix_-1):((int)((ix_-2)/2))"/>
|
||||
<DisplayString Condition="index()==0&&$T2==1" Optional="true">{st_.rest_.first_} ({index()})</DisplayString>
|
||||
<DisplayString Condition="index()==1&&$T2==1" Optional="true">{st_.rest_.rest_.first_} ({index()})</DisplayString>
|
||||
<DisplayString Condition="index()==2&&$T2==1" Optional="true">{st_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
|
||||
<DisplayString Condition="index()==3&&$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
|
||||
<DisplayString Condition="index()==4&&$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
|
||||
<DisplayString Condition="index()==5&&$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
|
||||
<DisplayString Condition="index()==6&&$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
|
||||
<DisplayString Condition="index()==7&&$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
|
||||
<DisplayString Condition="index()==8&&$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
|
||||
<DisplayString Condition="index()==9&&$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
|
||||
<DisplayString Condition="index()==0&&$T2==0" Optional="true">{st_[ix_%2].rest_.first_} ({index()})</DisplayString>
|
||||
<DisplayString Condition="index()==1&&$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.first_} ({index()})</DisplayString>
|
||||
<DisplayString Condition="index()==2&&$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.first_} ({index()})</DisplayString>
|
||||
<DisplayString Condition="index()==3&&$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
|
||||
<DisplayString Condition="index()==4&&$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
|
||||
<DisplayString Condition="index()==5&&$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
|
||||
<DisplayString Condition="index()==6&&$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
|
||||
<DisplayString Condition="index()==7&&$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
|
||||
<DisplayString Condition="index()==8&&$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
|
||||
<DisplayString Condition="index()==9&&$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>
|
Reference in New Issue
Block a user