diff --git a/include/rfl/Result.hpp b/include/rfl/Result.hpp index 3eda7a4f..a1847b67 100644 --- a/include/rfl/Result.hpp +++ b/include/rfl/Result.hpp @@ -332,7 +332,7 @@ class Result { bool has_value() const noexcept { return success_; } - Error& error() && { + Error&& error() && { if (success_) throw std::runtime_error("Expected does not contain value"); return std::move(*this).get_err(); }