From 0591caa4b9dae7bc82fc2fc27970ae6e600a0587 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 (synced from 16298d8672a9391b560a94ddd6f5393da3896c56) --- src/ox/std/error.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ox/std/error.hpp b/src/ox/std/error.hpp index 798d58c2b..a22575982 100644 --- a/src/ox/std/error.hpp +++ b/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;