From 35c7af0b67f350c789a693104db5f7d2c9ed48b3 Mon Sep 17 00:00:00 2001 From: Simon Brand Date: Wed, 1 Nov 2017 20:06:03 +0000 Subject: [PATCH] Remove some hard resets --- optional.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/optional.hpp b/optional.hpp index 396a5b7..74b8d5c 100644 --- a/optional.hpp +++ b/optional.hpp @@ -368,7 +368,7 @@ struct optional_copy_base : optional_operations_base { if (rhs.has_value()) { this->construct(rhs.get()); } else { - this->hard_reset(); + this->m_has_value = false; } } @@ -398,7 +398,7 @@ template struct optional_move_base : optional_copy_base { if (rhs.has_value()) { this->construct(std::move(rhs.get())); } else { - this->hard_reset(); + this->m_has_value = false; } } optional_move_base &operator=(const optional_move_base &rhs) = default;