1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 13:27:36 +00:00

AK: Add ReadonlySpan<T> as an alias for Span<T const>

This is a little clearer than Span<T const> where it looks like it's
the T not the underlying array that's const.
This commit is contained in:
MacDue 2023-02-05 17:59:03 +00:00 committed by Linus Groh
parent b1793868b0
commit 8483efb399
2 changed files with 9 additions and 2 deletions

View file

@ -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>