From 16298d8672a9391b560a94ddd6f5393da3896c56 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sun, 18 Apr 2021 15:05:48 -0500 Subject: [PATCH] [ox/std] Add const version of Result::get --- 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 798d58c2..a2257598 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 == 0; } + constexpr Error get(type *val) const noexcept { + *val = value; + return error; + } + constexpr Error get(type *val) noexcept { *val = value; return error;