1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 21:27:34 +00:00

AK: Add the InputBitStream concept

This will allow users to abstract away the endianness of the stream they
are using.
This commit is contained in:
Lucas CHOLLET 2023-11-04 18:10:33 -04:00 committed by Andreas Kling
parent 869c7c9bab
commit 6f059c9d60

View file

@ -7,6 +7,7 @@
#pragma once #pragma once
#include <AK/ByteBuffer.h> #include <AK/ByteBuffer.h>
#include <AK/Concepts.h>
#include <AK/MaybeOwned.h> #include <AK/MaybeOwned.h>
#include <AK/NumericLimits.h> #include <AK/NumericLimits.h>
#include <AK/OwnPtr.h> #include <AK/OwnPtr.h>
@ -427,4 +428,11 @@ public:
} }
}; };
template<typename T>
concept InputBitStream = OneOf<T, BigEndianInputBitStream, LittleEndianInputBitStream>;
} }
#if USING_AK_GLOBALLY
using AK::InputBitStream;
#endif