diff --git a/src/util/optional.h b/src/util/optional.h index c97a725ff..31a4cf8c9 100644 --- a/src/util/optional.h +++ b/src/util/optional.h @@ -29,7 +29,7 @@ public: } optional(optional && other):m_some(other.m_some) { if (m_some) - m_value = std::move(other.m_value); + new (&m_value) T(std::forward(other.m_value)); } template optional(Args&&... args):m_some(true) {