libhatchet
Loading...
Searching...
No Matches
hxdeque< T, capacity_ >::const_iterator Class Reference

#include <hxdeque.hpp>

Public Member Functions

 const_iterator (void)
const T & operator* (void) const
const_iterator operator+ (hxsize_t n_) const
const_iterator operator- (hxsize_t n_) const
hxsize_t operator- (const const_iterator &x_) const
const T & operator[] (hxsize_t n_) const
const_iterator & operator++ (void)
const_iterator operator++ (int)
const_iterator & operator-- (void)
const_iterator operator-- (int)
bool operator== (const const_iterator &x_) const
bool operator< (const const_iterator &x_) const

Detailed Description

template<hxdeque_concept_ T, hxsize_t capacity_ = hxallocator_dynamic_capacity>
class hxdeque< T, capacity_ >::const_iterator

const_iterator - A const random-access iterator over logical indices.

Iterators are invalidated by any operation that changes the deque.

Constructor & Destructor Documentation

◆ const_iterator()

template<hxdeque_concept_ T, hxsize_t capacity_ = hxallocator_dynamic_capacity>
hxdeque< T, capacity_ >::const_iterator::const_iterator ( void )
inline

Constructs an end iterator.

Member Function Documentation

◆ operator*()

template<hxdeque_concept_ T, hxsize_t capacity_ = hxallocator_dynamic_capacity>
const T & hxdeque< T, capacity_ >::const_iterator::operator* ( void ) const
inline

Returns a const reference to the element at the current position.

◆ operator+()

template<hxdeque_concept_ T, hxsize_t capacity_ = hxallocator_dynamic_capacity>
const_iterator hxdeque< T, capacity_ >::const_iterator::operator+ ( hxsize_t n_) const
inline

Returns an iterator advanced by n positions.

  • n : The number of positions to advance.

◆ operator++() [1/2]

template<hxdeque_concept_ T, hxsize_t capacity_ = hxallocator_dynamic_capacity>
const_iterator hxdeque< T, capacity_ >::const_iterator::operator++ ( int )
inline

Advances the iterator to the next element (post-increment).

◆ operator++() [2/2]

template<hxdeque_concept_ T, hxsize_t capacity_ = hxallocator_dynamic_capacity>
const_iterator & hxdeque< T, capacity_ >::const_iterator::operator++ ( void )
inline

Advances the iterator to the next element.

◆ operator-() [1/2]

template<hxdeque_concept_ T, hxsize_t capacity_ = hxallocator_dynamic_capacity>
hxsize_t hxdeque< T, capacity_ >::const_iterator::operator- ( const const_iterator & x_) const
inline

Returns the signed distance between two iterators.

  • x : The iterator to subtract.

◆ operator-() [2/2]

template<hxdeque_concept_ T, hxsize_t capacity_ = hxallocator_dynamic_capacity>
const_iterator hxdeque< T, capacity_ >::const_iterator::operator- ( hxsize_t n_) const
inline

Returns an iterator retreated by n positions.

  • n : The number of positions to retreat.

◆ operator--() [1/2]

template<hxdeque_concept_ T, hxsize_t capacity_ = hxallocator_dynamic_capacity>
const_iterator hxdeque< T, capacity_ >::const_iterator::operator-- ( int )
inline

Retreats the iterator to the previous element (post-decrement).

◆ operator--() [2/2]

template<hxdeque_concept_ T, hxsize_t capacity_ = hxallocator_dynamic_capacity>
const_iterator & hxdeque< T, capacity_ >::const_iterator::operator-- ( void )
inline

Retreats the iterator to the previous element.

◆ operator<()

template<hxdeque_concept_ T, hxsize_t capacity_ = hxallocator_dynamic_capacity>
bool hxdeque< T, capacity_ >::const_iterator::operator< ( const const_iterator & x_) const
inline

Returns true when this iterator is ordered before x.

  • x : The iterator to compare against.

◆ operator==()

template<hxdeque_concept_ T, hxsize_t capacity_ = hxallocator_dynamic_capacity>
bool hxdeque< T, capacity_ >::const_iterator::operator== ( const const_iterator & x_) const
inline

Compares two iterators for equality.

  • x : The iterator to compare against.

◆ operator[]()

template<hxdeque_concept_ T, hxsize_t capacity_ = hxallocator_dynamic_capacity>
const T & hxdeque< T, capacity_ >::const_iterator::operator[] ( hxsize_t n_) const
inline

Returns a const reference to the element n positions ahead of this one.

  • n : The offset from this position.

The documentation for this class was generated from the following file: