diff options
Diffstat (limited to 'AK')
-rw-r--r-- | AK/Forward.h | 5 | ||||
-rw-r--r-- | AK/Span.h | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/AK/Forward.h b/AK/Forward.h index e258449ffd..3f67a9fd8a 100644 --- a/AK/Forward.h +++ b/AK/Forward.h @@ -61,7 +61,10 @@ struct Array; template<typename Container, typename ValueType> class SimpleIterator; -using ReadonlyBytes = Span<u8 const>; +template<typename T> +using ReadonlySpan = Span<T const>; + +using ReadonlyBytes = ReadonlySpan<u8>; using Bytes = Span<u8>; template<typename T, AK::MemoryOrder DefaultMemoryOrder> @@ -271,7 +271,10 @@ struct Traits<Span<T>> : public GenericTraits<Span<T>> { constexpr static bool is_trivial() { return true; } }; -using ReadonlyBytes = Span<u8 const>; +template<typename T> +using ReadonlySpan = Span<T const>; + +using ReadonlyBytes = ReadonlySpan<u8>; using Bytes = Span<u8>; } @@ -279,5 +282,6 @@ using Bytes = Span<u8>; #if USING_AK_GLOBALLY using AK::Bytes; using AK::ReadonlyBytes; +using AK::ReadonlySpan; using AK::Span; #endif |