diff --git a/optional.h b/optional.h index 6b0dab1..4be6118 100644 --- a/optional.h +++ b/optional.h @@ -49,7 +49,7 @@ class optional { WISE_ENUM_CONSTEXPR_14 T &&value() && { if (m_active) - return m_t; + return std::move(m_t); else WISE_ENUM_OPTIONAL_BAD_ACCESS; }