[ox/std] Add const version of Result::get

This commit is contained in:
Gary Talent 2021-04-18 15:05:48 -05:00
parent 72cec8e459
commit 16298d8672

View File

@ -89,6 +89,11 @@ struct [[nodiscard]] Result {
return error == 0; return error == 0;
} }
constexpr Error get(type *val) const noexcept {
*val = value;
return error;
}
constexpr Error get(type *val) noexcept { constexpr Error get(type *val) noexcept {
*val = value; *val = value;
return error; return error;