diff --git a/luna/include/luna/Option.h b/luna/include/luna/Option.h index 49d58ee7..a80cf433 100644 --- a/luna/include/luna/Option.h +++ b/luna/include/luna/Option.h @@ -126,7 +126,7 @@ template class Option void store_moved_reference(T&& ref) { - new (buffer) T(ref); + new (buffer) T(move(ref)); } void destroy() diff --git a/luna/include/luna/Result.h b/luna/include/luna/Result.h index 1b93b37e..68581a28 100644 --- a/luna/include/luna/Result.h +++ b/luna/include/luna/Result.h @@ -25,7 +25,7 @@ template class Result m_has_error = false; } - Result(T&& value) : m_value(value) + Result(T&& value) : m_value(move(value)) { m_has_value = true; m_has_error = false; @@ -46,7 +46,7 @@ template class Result } } - Result(Result&& other) : m_value(other.m_value) + Result(Result&& other) : m_value(move(other.m_value)) { if (!other.m_has_error) {