diff --git a/include/boost/variant2/variant.hpp b/include/boost/variant2/variant.hpp index 63d9c14..23ce723 100644 --- a/include/boost/variant2/variant.hpp +++ b/include/boost/variant2/variant.hpp @@ -1544,13 +1544,13 @@ template struct Qret template using front_if_same = mp11::mp_if, mp11::mp_front>; -template::type>> using apply_cv_ref_ = mp11::mp_if, T&, T>; +template using var_alt = variant_alternative_t; #if BOOST_WORKAROUND( BOOST_MSVC, < 1920 ) template struct apply_cv_ref_impl { - template using _f = apply_cv_ref_; + template using _f = var_alt; using L = mp11::mp_iota>; @@ -1561,7 +1561,7 @@ template using apply_cv_ref = typename apply_cv_ref_impl::type; #else -template using apply_cv_ref = mp11::mp_transform_q, mp11::mp_iota>>; +template using apply_cv_ref = mp11::mp_transform_q, mp11::mp_iota>>; #endif