summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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:
181 consteval ResultRange(ErrorModule module, u32 description_start, u32 description_end_) 181 consteval ResultRange(ErrorModule module, u32 description_start, u32 description_end_)
182 : code{module, description_start}, description_end{description_end_} {} 182 : code{module, description_start}, description_end{description_end_} {}
183 183
184 [[nodiscard]] consteval operator ResultCode() const { 184 [[nodiscard]] constexpr operator ResultCode() const {
185 return code; 185 return code;
186 } 186 }
187 187
@@ -232,6 +232,8 @@ public:
232 232
233 constexpr ResultVal(ResultCode code) : expected{Common::Unexpected(code)} {} 233 constexpr ResultVal(ResultCode code) : expected{Common::Unexpected(code)} {}
234 234
235 constexpr ResultVal(ResultRange range) : expected{Common::Unexpected(range)} {}
236
235 template <typename U> 237 template <typename U>
236 constexpr ResultVal(U&& val) : expected{std::forward<U>(val)} {} 238 constexpr ResultVal(U&& val) : expected{std::forward<U>(val)} {}
237 239
@@ -317,7 +319,7 @@ public:
317 } 319 }
318 320
319private: 321private:
320 // TODO: Replace this with std::expected once it is standardized in the STL. 322 // TODO (Morph): Replace this with C++23 std::expected.
321 Common::Expected<T, ResultCode> expected; 323 Common::Expected<T, ResultCode> expected;
322}; 324};
323 325