From fb7b5823484859e259bc35cc68ca77150946503d Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 20 Mar 2021 15:32:13 -0500 Subject: [PATCH] [ox/std] Add moveTo method to Result --- deps/ox/src/ox/std/error.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deps/ox/src/ox/std/error.hpp b/deps/ox/src/ox/std/error.hpp index 4af771af..5fda3d1c 100644 --- a/deps/ox/src/ox/std/error.hpp +++ b/deps/ox/src/ox/std/error.hpp @@ -89,6 +89,11 @@ struct [[nodiscard]] Result { return error; } + constexpr Error moveTo(T *val) noexcept { + *val = ox::move(value); + return error; + } + }; namespace detail {