Skip to content

ext::index_map

An adaptor map to shift zero-based containers to a different base. More...

#include <index_map.h>

Inherits from std::vector< T >

Public Functions

Name
Sequence< T >::referenceoperator[](const std::size_t index)
Sequence< T >::const_referenceoperator[](const std::size_t index) const

Detailed Description

cpp
template <std::size_t BaseIndex,
typename T ,
template< typename... > class Sequence =std::vector>
class ext::index_map;

An adaptor map to shift zero-based containers to a different base.

Template Parameters:

  • BaseIndex The starting index for the container adaptor.
  • T A value type for the underlying container.
  • Sequence A zero-based sequence container supporting operator[].

Postcondition: The adaptor only guarantees access adjustment for operator[]. The element access by other means are not adjusted, e.g., at().

Public Functions Documentation

function operator[]

cpp
inline Sequence< T >::reference operator[](
    const std::size_t index
)

Parameters:

  • index The BaseIndex-based index of the container adaptor.

Return: The reference to value at the index.

Precondition: index >= BaseIndex

function operator[]

cpp
inline Sequence< T >::const_reference operator[](
    const std::size_t index
) const

Updated on 2026-01-09 at 21:59:12 +0000