diff --git a/include/rfl/Result.hpp b/include/rfl/Result.hpp index 9400e20e..9e84d24f 100644 --- a/include/rfl/Result.hpp +++ b/include/rfl/Result.hpp @@ -45,6 +45,14 @@ class Result { Result(Error&& _err) noexcept : t_or_err_(std::move(_err)) {} + template , + bool>::type = true> + Result(Result&& _other) + : t_or_err_( + std::forward>(_other) + .transform([](U&& _u) { return T(std::forward(_u)); }) + .t_or_err_) {} + template , bool>::type = true> Result(const Result& _other)