indexed_span

template<typename Value, typename Indexer>
class indexed_span

Span-like class which allows accessing elements through a custom indexer. indexed_span does not own the data, and its size is always known at compile time (it always cover the full Indexer range). It is multidimensional if the Indexer is. It is related to std::span<T, std::static_extent> and has a similar interface.

The primary use case for indexed_span is that it is the type returned by a multidimensional indexed_array when accessing a lower-rank dimension via the slice() method.

Construction and destruction

Constructors

indexed_span() = delete

default constructor is deleted

copy/move operators defaulted

indexed_span(Value*)

constructor from a Value*

Member functions

Data access

Functions always present

indexed_span::at(index) const

Element access (range-checked)

indexed_span::operator[](index) const

Element access (unchecked)

indexed_span::data() const

Access to raw storage

indexed_span::front() const

Access to first element

indexed_span::back() const

Access to last element

Multidimensional specific

Access to subrank

Observers

indexed_span::empty() const

Checks sequence for emptiness

indexed_span::size() const

Returns the size of the sequence

Iteration

Iterator to start of sequence

Iterator past the end of the sequence

Iterator to start of reverse sequence

Iterator past the end of the reverse sequence