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
Notes: sideshowbarker 2024-07-17 03:10:07 +09:00

View file

@ -7,6 +7,7 @@
#pragma once
#include <AK/ByteBuffer.h>
#include <AK/Concepts.h>
#include <AK/MaybeOwned.h>
#include <AK/NumericLimits.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