diff --git a/AK/Error.h b/AK/Error.h index 8b3fcdd5589..007bd8a22a0 100644 --- a/AK/Error.h +++ b/AK/Error.h @@ -72,9 +72,12 @@ private: bool m_syscall { false }; }; -template +template class [[nodiscard]] ErrorOr { public: + using ResultType = T; + using ErrorType = E; + ErrorOr() requires(IsSame) : m_value_or_error(Empty {}) @@ -146,6 +149,7 @@ private: template class [[nodiscard]] ErrorOr : public ErrorOr { public: + using ResultType = void; using ErrorOr::ErrorOr; };