Span

gsl::span or in C++20 std::span is an object that hold a contiguous sequence of objects which provide a range checking for primitive arrays that is not one of the #202202241719. It provides a range checking for them where the size of the sequence is to be known at compile time. It deprecates the use of either raw pointer or smart pointer in order to obtain a view on a sequence of objects.

#cpp #container