[ox/std] Add const version of Result::get
This commit is contained in:
parent
72cec8e459
commit
16298d8672
5
deps/ox/src/ox/std/error.hpp
vendored
5
deps/ox/src/ox/std/error.hpp
vendored
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user