AK: Forward declare Error and ErrorOr in AK/Forward.h

This commit is contained in:
Andreas Kling 2021-11-16 00:41:28 +01:00
parent 587f9af960
commit 11aad74dce
Notes: sideshowbarker 2024-07-18 01:03:48 +09:00
2 changed files with 7 additions and 1 deletions

View file

@ -45,7 +45,7 @@ private:
StringView m_string_literal;
};
template<typename T, typename ErrorType = Error>
template<typename T, typename ErrorType>
class [[nodiscard]] ErrorOr {
public:
ErrorOr(T const& value)

View file

@ -17,6 +17,7 @@ class ByteBuffer;
class Bitmap;
using ByteBuffer = AK::Detail::ByteBuffer<32>;
class Error;
class GenericLexer;
class IPv4Address;
class JsonArray;
@ -125,6 +126,9 @@ class WeakPtr;
template<typename T, size_t inline_capacity = 0>
requires(!IsRvalueReference<T>) class Vector;
template<typename T, typename ErrorType = Error>
class [[nodiscard]] ErrorOr;
}
using AK::Array;
@ -137,6 +141,8 @@ using AK::CircularDuplexStream;
using AK::CircularQueue;
using AK::DoublyLinkedList;
using AK::DuplexMemoryStream;
using AK::Error;
using AK::ErrorOr;
using AK::FixedArray;
using AK::FlyString;
using AK::Function;