diff --git a/extra/boost_variant2.natvis b/extra/boost_variant2.natvis
index 8f8cab4..a8c29b8 100644
--- a/extra/boost_variant2.natvis
+++ b/extra/boost_variant2.natvis
@@ -1,32 +1,178 @@
-
-
- {st_.rest_.first_} ({index()})
- {st_.rest_.rest_.first_} ({index()})
- {st_.rest_.rest_.rest_.first_} ({index()})
- {st_.rest_.rest_.rest_.rest_.first_} ({index()})
- {st_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})
- {st_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})
- {st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})
- {st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})
- {st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})
- {st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})
- {st_[ix_%2].rest_.first_} ({index()})
- {st_[ix_%2].rest_.rest_.first_} ({index()})
- {st_[ix_%2].rest_.rest_.rest_.first_} ({index()})
- {st_[ix_%2].rest_.rest_.rest_.rest_.first_} ({index()})
- {st_[ix_%2].rest_.rest_.rest_.rest_.rest_.first_} ({index()})
- {st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})
- {st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})
- {st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})
- {st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})
- {st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})
-
- - index()
- - ix_
-
-
+
+
+ {{ index=0, value={*($T2*)&st_} }}
+ {{ index=1, value={*($T3*)&st_} }}
+ {{ index=2, value={*($T4*)&st_} }}
+ {{ index=3, value={*($T5*)&st_} }}
+ {{ index=4, value={*($T6*)&st_} }}
+ {{ index=5, value={*($T7*)&st_} }}
+ {{ index=6, value={*($T8*)&st_} }}
+ {{ index=7, value={*($T9*)&st_} }}
+ {{ index=8, value={*($T10*)&st_} }}
+ {{ index=9, value={*($T11*)&st_} }}
+ {{ index=10, value={*($T12*)&st_} }}
+ {{ index=11, value={*($T13*)&st_} }}
+ {{ index=12, value={*($T14*)&st_} }}
+ {{ index=13, value={*($T15*)&st_} }}
+ {{ index=14, value={*($T16*)&st_} }}
+ {{ index=15, value={*($T17*)&st_} }}
+ {{ index=16, value={*($T18*)&st_} }}
+ {{ index=17, value={*($T19*)&st_} }}
+ {{ index=18, value={*($T20*)&st_} }}
+ {{ index=19, value={*($T21*)&st_} }}
+ {{ index=10, value={*($T22*)&st_} }}
+ {{ index=21, value={*($T23*)&st_} }}
+ {{ index=22, value={*($T24*)&st_} }}
+ {{ index=23, value={*($T25*)&st_} }}
+ {{ index=24, value={*($T26*)&st_} }}
+ {{ index=25, value={*($T27*)&st_} }}
+ {{ index=26, value={*($T28*)&st_} }}
+ {{ index=27, value={*($T29*)&st_} }}
+ {{ index=28, value={*($T30*)&st_} }}
+ {{ index=29, value={*($T31*)&st_} }}
+ {{ index=30, value={*($T32*)&st_} }}
+ {{ index=31, value={*($T33*)&st_} }}
+ {{ index=32, value={*($T34*)&st_} }}
+ {{ index=33, value={*($T35*)&st_} }}
+ {{ index=34, value={*($T36*)&st_} }}
+ {{ index=35, value={*($T37*)&st_} }}
+ {{ index=36, value={*($T38*)&st_} }}
+ {{ index=37, value={*($T39*)&st_} }}
+ {{ index=38, value={*($T40*)&st_} }}
+ {{ index=39, value={*($T41*)&st_} }}
+
+ - index()
+ - *($T2*)&st_
+ - *($T3*)&st_
+ - *($T4*)&st_
+ - *($T5*)&st_
+ - *($T6*)&st_
+ - *($T7*)&st_
+ - *($T8*)&st_
+ - *($T9*)&st_
+ - *($T10*)&st_
+ - *($T11*)&st_
+ - *($T12*)&st_
+ - *($T13*)&st_
+ - *($T14*)&st_
+ - *($T15*)&st_
+ - *($T16*)&st_
+ - *($T17*)&st_
+ - *($T18*)&st_
+ - *($T19*)&st_
+ - *($T20*)&st_
+ - *($T21*)&st_
+ - *($T22*)&st_
+ - *($T23*)&st_
+ - *($T24*)&st_
+ - *($T25*)&st_
+ - *($T26*)&st_
+ - *($T27*)&st_
+ - *($T28*)&st_
+ - *($T29*)&st_
+ - *($T30*)&st_
+ - *($T31*)&st_
+ - *($T32*)&st_
+ - *($T33*)&st_
+ - *($T34*)&st_
+ - *($T35*)&st_
+ - *($T36*)&st_
+ - *($T37*)&st_
+ - *($T38*)&st_
+ - *($T39*)&st_
+ - *($T40*)&st_
+ - *($T41*)&st_
+
+
+
+
+
+ {{ index=0, value={*($T2*)&st_[ix_%2]} }}
+ {{ index=1, value={*($T3*)&st_[ix_%2]} }}
+ {{ index=2, value={*($T4*)&st_[ix_%2]} }}
+ {{ index=3, value={*($T5*)&st_[ix_%2]} }}
+ {{ index=4, value={*($T6*)&st_[ix_%2]} }}
+ {{ index=5, value={*($T7*)&st_[ix_%2]} }}
+ {{ index=6, value={*($T8*)&st_[ix_%2]} }}
+ {{ index=7, value={*($T9*)&st_[ix_%2]} }}
+ {{ index=8, value={*($T10*)&st_[ix_%2]} }}
+ {{ index=9, value={*($T11*)&st_[ix_%2]} }}
+ {{ index=10, value={*($T12*)&st_[ix_%2]} }}
+ {{ index=11, value={*($T13*)&st_[ix_%2]} }}
+ {{ index=12, value={*($T14*)&st_[ix_%2]} }}
+ {{ index=13, value={*($T15*)&st_[ix_%2]} }}
+ {{ index=14, value={*($T16*)&st_[ix_%2]} }}
+ {{ index=15, value={*($T17*)&st_[ix_%2]} }}
+ {{ index=16, value={*($T18*)&st_[ix_%2]} }}
+ {{ index=17, value={*($T19*)&st_[ix_%2]} }}
+ {{ index=18, value={*($T20*)&st_[ix_%2]} }}
+ {{ index=19, value={*($T21*)&st_[ix_%2]} }}
+ {{ index=20, value={*($T22*)&st_[ix_%2]} }}
+ {{ index=21, value={*($T23*)&st_[ix_%2]} }}
+ {{ index=22, value={*($T24*)&st_[ix_%2]} }}
+ {{ index=23, value={*($T25*)&st_[ix_%2]} }}
+ {{ index=24, value={*($T26*)&st_[ix_%2]} }}
+ {{ index=25, value={*($T27*)&st_[ix_%2]} }}
+ {{ index=26, value={*($T28*)&st_[ix_%2]} }}
+ {{ index=27, value={*($T29*)&st_[ix_%2]} }}
+ {{ index=28, value={*($T30*)&st_[ix_%2]} }}
+ {{ index=29, value={*($T31*)&st_[ix_%2]} }}
+ {{ index=30, value={*($T32*)&st_[ix_%2]} }}
+ {{ index=31, value={*($T33*)&st_[ix_%2]} }}
+ {{ index=32, value={*($T34*)&st_[ix_%2]} }}
+ {{ index=33, value={*($T35*)&st_[ix_%2]} }}
+ {{ index=34, value={*($T36*)&st_[ix_%2]} }}
+ {{ index=35, value={*($T37*)&st_[ix_%2]} }}
+ {{ index=36, value={*($T38*)&st_[ix_%2]} }}
+ {{ index=37, value={*($T39*)&st_[ix_%2]} }}
+ {{ index=38, value={*($T40*)&st_[ix_%2]} }}
+ {{ index=39, value={*($T41*)&st_[ix_%2]} }}
+
+ - index()
+ - *($T2*)&st_[ix_%2]
+ - *($T3*)&st_[ix_%2]
+ - *($T4*)&st_[ix_%2]
+ - *($T5*)&st_[ix_%2]
+ - *($T6*)&st_[ix_%2]
+ - *($T7*)&st_[ix_%2]
+ - *($T8*)&st_[ix_%2]
+ - *($T9*)&st_[ix_%2]
+ - *($T10*)&st_[ix_%2]
+ - *($T11*)&st_[ix_%2]
+ - *($T12*)&st_[ix_%2]
+ - *($T13*)&st_[ix_%2]
+ - *($T14*)&st_[ix_%2]
+ - *($T15*)&st_[ix_%2]
+ - *($T16*)&st_[ix_%2]
+ - *($T17*)&st_[ix_%2]
+ - *($T18*)&st_[ix_%2]
+ - *($T19*)&st_[ix_%2]
+ - *($T20*)&st_[ix_%2]
+ - *($T21*)&st_[ix_%2]
+ - *($T22*)&st_[ix_%2]
+ - *($T23*)&st_[ix_%2]
+ - *($T24*)&st_[ix_%2]
+ - *($T25*)&st_[ix_%2]
+ - *($T26*)&st_[ix_%2]
+ - *($T27*)&st_[ix_%2]
+ - *($T28*)&st_[ix_%2]
+ - *($T29*)&st_[ix_%2]
+ - *($T30*)&st_[ix_%2]
+ - *($T31*)&st_[ix_%2]
+ - *($T32*)&st_[ix_%2]
+ - *($T33*)&st_[ix_%2]
+ - *($T34*)&st_[ix_%2]
+ - *($T35*)&st_[ix_%2]
+ - *($T36*)&st_[ix_%2]
+ - *($T37*)&st_[ix_%2]
+ - *($T38*)&st_[ix_%2]
+ - *($T39*)&st_[ix_%2]
+ - *($T40*)&st_[ix_%2]
+ - *($T41*)&st_[ix_%2]
+
+
diff --git a/include/boost/variant2/variant.hpp b/include/boost/variant2/variant.hpp
index aec8966..1668436 100644
--- a/include/boost/variant2/variant.hpp
+++ b/include/boost/variant2/variant.hpp
@@ -1634,7 +1634,17 @@ public:
template::type,
class E1 = typename std::enable_if< !std::is_same::value && !std::is_base_of::value && !detail::is_in_place_index::value && !detail::is_in_place_type::value >::type,
+
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1940)
+
+ class V = mp11::mp_apply_q< mp11::mp_bind_front, variant >,
+
+#else
+
class V = detail::resolve_overload_type,
+
+#endif
+
class E2 = typename std::enable_if::value>::type
>
constexpr variant( U&& u )
diff --git a/test/Jamfile b/test/Jamfile
index 271279e..6552c2b 100644
--- a/test/Jamfile
+++ b/test/Jamfile
@@ -137,3 +137,5 @@ run variant_json_value_from.cpp : : : $(JSON) ;
run variant_json_value_to.cpp : : : $(JSON) ;
compile variant_uses_double_storage.cpp ;
+
+run variant_derived_construct2.cpp ;
diff --git a/test/variant_derived_construct2.cpp b/test/variant_derived_construct2.cpp
new file mode 100644
index 0000000..31488aa
--- /dev/null
+++ b/test/variant_derived_construct2.cpp
@@ -0,0 +1,60 @@
+// Copyright 2024 Peter Dimov.
+// Distributed under the Boost Software License, Version 1.0.
+// https://www.boost.org/LICENSE_1_0.txt
+
+#include
+#include
+
+struct expr: boost::variant2::variant
+{
+ using variant::variant;
+};
+
+int main()
+{
+ using boost::variant2::get;
+
+ {
+ expr v{ true };
+
+ BOOST_TEST_EQ( v.index(), 0 );
+ BOOST_TEST_EQ( get<0>(v), true );
+ }
+
+ {
+ expr v{ 2 };
+
+ BOOST_TEST_EQ( v.index(), 1 );
+ BOOST_TEST_EQ( get<1>(v), 2 );
+ }
+
+ {
+ expr v{ 3.0 };
+
+ BOOST_TEST_EQ( v.index(), 2 );
+ BOOST_TEST_EQ( get<2>(v), 3.0 );
+ }
+
+ {
+ expr v( true );
+
+ BOOST_TEST_EQ( v.index(), 0 );
+ BOOST_TEST_EQ( get<0>(v), true );
+ }
+
+ {
+ expr v( 2 );
+
+ BOOST_TEST_EQ( v.index(), 1 );
+ BOOST_TEST_EQ( get<1>(v), 2 );
+ }
+
+ {
+ expr v( 3.0 );
+
+ BOOST_TEST_EQ( v.index(), 2 );
+ BOOST_TEST_EQ( get<2>(v), 3.0 );
+ }
+
+ return boost::report_errors();
+}