From 6a56887068b85abcb4580dcabbd6e7a53cc25ea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Alexandre=20Boissonneault?= Date: Sat, 2 Dec 2017 22:06:07 -0500 Subject: [PATCH] Fixed non-trivial copy assignment in "expected_move_assign_base" --- expected.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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