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

(synced from 16298d8672)
This commit is contained in:
2021-04-18 15:05:48 -05:00
parent eadc3504ff
commit 0591caa4b9
+5
View File
@@ -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;