diff --git a/include/boost/variant2/variant.hpp b/include/boost/variant2/variant.hpp index fabc9fb..f7fac51 100644 --- a/include/boost/variant2/variant.hpp +++ b/include/boost/variant2/variant.hpp @@ -1190,30 +1190,30 @@ public: class Ud = typename std::decay::type, class E1 = typename std::enable_if< !std::is_same::value && !detail::is_in_place_index::value && !detail::is_in_place_type::value >::type, class V = detail::resolve_overload_type, - class E2 = typename std::enable_if::value>::type + class E2 = typename std::enable_if::value>::type > constexpr variant( U&& u ) - noexcept( std::is_nothrow_constructible::value ) + noexcept( std::is_nothrow_constructible::value ) : variant_base( detail::resolve_overload_index(), std::forward(u) ) { } - template, U>, class E = typename std::enable_if::value>::type> + template, U>, class E = typename std::enable_if::value>::type> constexpr explicit variant( in_place_type_t, A&&... a ): variant_base( I(), std::forward(a)... ) { } - template, U>, class E = typename std::enable_if&, A...>::value>::type> + template, U>, class E = typename std::enable_if&, A&&...>::value>::type> constexpr explicit variant( in_place_type_t, std::initializer_list il, A&&... a ): variant_base( I(), il, std::forward(a)... ) { } - template, I>, A...>::value>::type> + template, I>, A&&...>::value>::type> constexpr explicit variant( in_place_index_t, A&&... a ): variant_base( mp11::mp_size_t(), std::forward(a)... ) { } - template, I>, std::initializer_list&, A...>::value>::type> + template, I>, std::initializer_list&, A&&...>::value>::type> constexpr explicit variant( in_place_index_t, std::initializer_list il, A&&... a ): variant_base( mp11::mp_size_t(), il, std::forward(a)... ) { } @@ -1306,10 +1306,10 @@ public: template::type, variant>::value>::type, class V = detail::resolve_overload_type, - class E2 = typename std::enable_if::value && std::is_constructible::value>::type + class E2 = typename std::enable_if::value && std::is_constructible::value>::type > BOOST_CXX14_CONSTEXPR variant& operator=( U&& u ) - noexcept( std::is_nothrow_assignable::value && std::is_nothrow_constructible::value ) + noexcept( std::is_nothrow_assignable::value && std::is_nothrow_constructible::value ) { std::size_t const I = detail::resolve_overload_index::value; @@ -1328,7 +1328,7 @@ public: // modifiers template, U>::value == 1 && std::is_constructible::value >::type> + class E = typename std::enable_if< mp11::mp_count, U>::value == 1 && std::is_constructible::value >::type> BOOST_CXX14_CONSTEXPR U& emplace( A&&... a ) { using I = mp11::mp_find, U>; @@ -1337,7 +1337,7 @@ public: } template, U>::value == 1 && std::is_constructible&, A...>::value >::type> + class E = typename std::enable_if< mp11::mp_count, U>::value == 1 && std::is_constructible&, A&&...>::value >::type> BOOST_CXX14_CONSTEXPR U& emplace( std::initializer_list il, A&&... a ) { using I = mp11::mp_find, U>; @@ -1345,14 +1345,14 @@ public: return _get_impl( I() ); } - template, I>, A...>::value>::type> + template, I>, A&&...>::value>::type> BOOST_CXX14_CONSTEXPR variant_alternative_t>& emplace( A&&... a ) { variant_base::template emplace( std::forward(a)... ); return _get_impl( mp11::mp_size_t() ); } - template, I>, std::initializer_list&, A...>::value>::type> + template, I>, std::initializer_list&, A&&...>::value>::type> BOOST_CXX14_CONSTEXPR variant_alternative_t>& emplace( std::initializer_list il, A&&... a ) { variant_base::template emplace( il, std::forward(a)... );