Indexed_array observers

std::array interface

constexpr bool indexed_array::empty() const

Returns true if the container is empty, ie the array size is 0. Otherwise, the array is not empty.

constexpr std::size_t indexed_array::size() const

Returns the size of the array, which is a compile-time constant.

constexpr std::size_t indexed_array::max_size() const

Returns the maximum size of the array, which is always the same as its size.

void fill(value_type const &value)

Fills the array with value, ie, replace every element in the array with value.

void swap(indexed_array &other)

Exchanges the array contents, as per std::array::swap.

Extensions

static constexpr bool indexed_array::in_range(index)

static constexpr method that returns true if the argument is a valid index value for this array, ie calling operator[value] is well defined behavior. Returns false otherwise.

static constexpr bool indexed_array::is_o1

static member that describe if access to this indexed array is guaranted to be O(1). This information can be used for static asserts when O(1) access is a requirement, or for performance improvements by selecting different algorithm in function of this property.

static constexpr bool indexed_array::has_limits

static member that describe if the indexed array provides its limits as part of its

interface. Depending on the indexer used, this may or may not be the case, as some indexers do not provide a way to know these limits. If this value is true, then the indexed_array provides two additional members (see below).

static constexpr index_type indexed_array::low_limit()

Returns the lowest valid index for this array, ie the lowest value for which array[value] has defined behaviour.

static constexpr index_type indexed_array::high_limit()

Returns the highest valid index for this array, ie the highest value

for which array[value] has defined behaviour.