From e25de1b4b55aedaa7c14f7a16b8b4101d59772a3 Mon Sep 17 00:00:00 2001 From: xgdgsc Date: Tue, 19 Oct 2021 17:38:40 +0800 Subject: [PATCH] std14 compile error --- optional.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }