diff --git a/AK/Result.h b/AK/Result.h index 585b63d4ff..edfb3f8927 100644 --- a/AK/Result.h +++ b/AK/Result.h @@ -11,9 +11,12 @@ namespace AK { -template +template class [[nodiscard]] Result { public: + using ValueType = ValueT; + using ErrorType = ErrorT; + Result(const ValueType& res) : m_result(res) { @@ -69,9 +72,12 @@ private: }; // Partial specialization for void value type -template -class [[nodiscard]] Result { +template +class [[nodiscard]] Result { public: + using ValueType = void; + using ErrorType = ErrorT; + Result(const ErrorType& error) : m_error(error) {