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.