Span

Span class

Represents a contiguous region of arbitrary memory similar to C++20’s std::span.

template<typename T>class Span : public System::Details::SpanCore<T, Span<T>, Span<T>>

Template parameters

ParameterDescription
TThe type of elements in the span. This class provides a type-safe way to work with contiguous sequences of objects. It can be used to wrap arrays, stack arrays, or raw pointers while maintaining bounds checking. The Span doesn’t own the memory it points to - it’s just a view into existing memory.

Methods

MethodDescription
void Clear() constClears the contents of the span by setting all elements to default value.
void Fill(const T&) constFills the span with the specified value.
static ThisType to_Span(const typename BaseType::ArrayPtrT&)Converts an array to a Span.

See Also