Przeglądaj źródła

AK: Allow to "get a result" from Result<void>

This is to make Result<void> work inside TRY
Hendiadyoin1 3 lat temu
rodzic
commit
6f74c1bb11
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      AK/Result.h

+ 4 - 0
AK/Result.h

@@ -93,6 +93,10 @@ public:
     Result(const Result& other) = default;
     ~Result() = default;
 
+    // For compatibility with TRY().
+    void value() {};
+    void release_value() {};
+
     ErrorType& error()
     {
         return m_error.value();