From 2deab3fcbba012123af662565b8c94e2b3c2ca49 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Fri, 25 Mar 2022 20:43:04 -0500 Subject: [PATCH] [ox/std] Add Result::Result(const Result other) (synced from a02d496de56785c79d2618da0924de53035cee11) --- src/ox/std/error.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ox/std/error.hpp b/src/ox/std/error.hpp index 1675fffd5..2931be94b 100644 --- a/src/ox/std/error.hpp +++ b/src/ox/std/error.hpp @@ -126,6 +126,10 @@ struct [[nodiscard]] Result { constexpr Result() noexcept: error(0) { } + template + constexpr Result(const Result &other) noexcept: value(other.value), error(error) { + } + constexpr Result(const Error &error) noexcept: error(error) { }