diff --git a/include/boost/variant2/variant.hpp b/include/boost/variant2/variant.hpp index 9f3a980..9c6b47d 100644 --- a/include/boost/variant2/variant.hpp +++ b/include/boost/variant2/variant.hpp @@ -892,11 +892,11 @@ public: if( this->index() == I ) { - get(*this) = get(r); + this->_get_impl( I ) = r._get_impl( I ); } else { - this->variant_base::template emplace( get(r) ); + this->variant_base::template emplace( r._get_impl( I ) ); } }); @@ -912,11 +912,11 @@ public: if( this->index() == I ) { - get(*this) = get(std::move(r)); + this->_get_impl( I ) = std::move( r._get_impl( I ) ); } else { - this->variant_base::template emplace( get(std::move(r)) ); + this->variant_base::template emplace( std::move( r._get_impl( I ) ) ); } }); @@ -989,7 +989,7 @@ public: mp_for_index( index(), [&]( auto I ){ using std::swap; - swap( get(*this), get(r) ); + swap( this->_get_impl( I ), r._get_impl( I ) ); }); } @@ -1064,7 +1064,7 @@ public: using J = mp_find, mp_at_c, I>>; - return _subset_impl( J{}, get( *this ) ); + return _subset_impl( J{}, this->_get_impl( I ) ); }); } @@ -1077,7 +1077,7 @@ public: using J = mp_find, mp_at_c, I>>; - return _subset_impl( J{}, get( *this ) ); + return _subset_impl( J{}, this->_get_impl( I ) ); }); } @@ -1090,7 +1090,7 @@ public: using J = mp_find, mp_at_c, I>>; - return _subset_impl( J{}, get( std::move(*this) ) ); + return _subset_impl( J{}, std::move( this->_get_impl( I ) ) ); }); } @@ -1103,7 +1103,7 @@ public: using J = mp_find, mp_at_c, I>>; - return _subset_impl( J{}, get( std::move(*this) ) ); + return _subset_impl( J{}, std::move( this->_get_impl( I ) ) ); }); } @@ -1116,7 +1116,7 @@ template constexpr bool operator==( variant const & v, variant return mp_for_index( v.index(), [&]( auto I ){ - return get(v) == get(w); + return v._get_impl( I ) == w._get_impl( I ); }); } @@ -1127,7 +1127,7 @@ template constexpr bool operator!=( variant const & v, variant return mp_for_index( v.index(), [&]( auto I ){ - return get(v) != get(w); + return v._get_impl( I ) != w._get_impl( I ); }); } @@ -1139,7 +1139,7 @@ template constexpr bool operator<( variant const & v, variant< return mp_for_index( v.index(), [&]( auto I ){ - return get(v) < get(w); + return v._get_impl( I ) < w._get_impl( I ); }); } @@ -1151,7 +1151,7 @@ template constexpr bool operator>( variant const & v, variant return mp_for_index( v.index(), [&]( auto I ){ - return get(v) > get(w); + return v._get_impl( I ) > w._get_impl( I ); }); } @@ -1163,7 +1163,7 @@ template constexpr bool operator<=( variant const & v, variant return mp_for_index( v.index(), [&]( auto I ){ - return get(v) <= get(w); + return v._get_impl( I ) <= w._get_impl( I ); }); } @@ -1175,7 +1175,7 @@ template constexpr bool operator>=( variant const & v, variant return mp_for_index( v.index(), [&]( auto I ){ - return get(v) >= get(w); + return v._get_impl( I ) >= w._get_impl( I ); }); }