summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMai M <mathew1800@gmail.com>2022-05-04 02:12:45 +0200
committerGitHub <noreply@github.com>2022-05-04 02:12:45 +0200
commit18a0c2e9dbd39d0ef67476fc3ac78233a44586b8 (patch)
treeceec2b024cc32713d54ce55e10c2edcccddaf034
parentMerge pull request #8272 from german77/stick_range (diff)
parenthle/result: Update std::expected replacement message (diff)
downloadyuzu-18a0c2e9dbd39d0ef67476fc3ac78233a44586b8.tar
yuzu-18a0c2e9dbd39d0ef67476fc3ac78233a44586b8.tar.gz
yuzu-18a0c2e9dbd39d0ef67476fc3ac78233a44586b8.tar.bz2
yuzu-18a0c2e9dbd39d0ef67476fc3ac78233a44586b8.tar.lz
yuzu-18a0c2e9dbd39d0ef67476fc3ac78233a44586b8.tar.xz
yuzu-18a0c2e9dbd39d0ef67476fc3ac78233a44586b8.tar.zst
yuzu-18a0c2e9dbd39d0ef67476fc3ac78233a44586b8.zip
-rw-r--r--src/core/hle/result.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/result.h b/src/core/hle/result.h
index 8d38d0030..569dd9f38 100644
--- a/src/core/hle/result.h
+++ b/src/core/hle/result.h
@@ -181,7 +181,7 @@ public:
consteval ResultRange(ErrorModule module, u32 description_start, u32 description_end_)
: code{module, description_start}, description_end{description_end_} {}
- [[nodiscard]] consteval operator ResultCode() const {
+ [[nodiscard]] constexpr operator ResultCode() const {
return code;
}
@@ -232,6 +232,8 @@ public:
constexpr ResultVal(ResultCode code) : expected{Common::Unexpected(code)} {}
+ constexpr ResultVal(ResultRange range) : expected{Common::Unexpected(range)} {}
+
template <typename U>
constexpr ResultVal(U&& val) : expected{std::forward<U>(val)} {}
@@ -317,7 +319,7 @@ public:
}
private:
- // TODO: Replace this with std::expected once it is standardized in the STL.
+ // TODO (Morph): Replace this with C++23 std::expected.
Common::Expected<T, ResultCode> expected;
};