From 1d3981271fa2c2809cfdbdf8da147bb57db0a1a1 Mon Sep 17 00:00:00 2001 From: Simon Brand Date: Tue, 5 Dec 2017 20:21:19 +0000 Subject: [PATCH] Revert --- expected.hpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/expected.hpp b/expected.hpp index 348cdb5..5d817a5 100644 --- a/expected.hpp +++ b/expected.hpp @@ -612,15 +612,7 @@ struct expected_copy_base : expected_operations_base { } expected_copy_base(expected_copy_base &&rhs) = default; - expected_copy_base &operator=(const expected_copy_base &rhs) { - if (rhs.has_value()) { - this->construct(rhs.get()); - } - else { - this->construct_error(rhs.geterr()); - } - return *this; - } + expected_copy_base &operator=(const expected_copy_base &rhs) = default; expected_copy_base &operator=(expected_copy_base &&rhs) = default; }; @@ -721,7 +713,6 @@ struct expected_move_assign_base operator=(const expected_move_assign_base &rhs) = default; expected_move_assign_base & - operator=(expected_move_assign_base &&rhs) noexcept( std::is_nothrow_move_constructible::value &&std::is_nothrow_move_assignable::value) {