diff --git a/expected.hpp b/expected.hpp index e4fa84d..d7e875a 100644 --- a/expected.hpp +++ b/expected.hpp @@ -710,14 +710,14 @@ struct expected_move_assign_base expected_move_assign_base(expected_move_assign_base &&rhs) = default; expected_move_assign_base & - operator=(const expected_move_assign_base &rhs) noexcept( - std::is_nothrow_move_constructible::value - &&std::is_nothrow_move_assignable::value) { - this->assign(rhs); - return *this; - } + operator=(const expected_move_assign_base &rhs) = default; expected_move_assign_base & - operator=(expected_move_assign_base &&rhs) = default; + operator=(expected_move_assign_base &&rhs) noexcept( + std::is_nothrow_move_constructible::value + &&std::is_nothrow_move_assignable::value) { + this->assign(std::move(rhs)); + return *this; + } }; // expected_delete_ctor_base will conditionally delete copy and move