From f0acc9326ee54534eb31ec1636608dd01f232790 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 24 Mar 2024 19:16:09 +0200 Subject: [PATCH] Work around MSVC failures in variant_derived_construct2. Refs #43. --- include/boost/variant2/variant.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 )