bn::ideque::const_iterator class
#include <bn_deque.h>

Const iterator.

Public types

using value_type = ideque::value_type
Value type alias.
using size_type = ideque::size_type
Size type alias.
using difference_type = ideque::difference_type
Difference type alias.
using reference = ideque::const_reference
Reference alias.
using pointer = ideque::const_pointer
Pointer alias.
using iterator_category = random_access_iterator_tag
Iterator category alias.

Constructors, destructors, conversion operators

const_iterator() defaulted
Default class constructor.
const_iterator(const iterator& it)
Public constructor.

Public functions

auto operator++() -> const_iterator&
Increments the position.
auto operator++(int) -> const_iterator
Increments the position.
auto operator+=(size_type value) -> const_iterator&
Increments the position the given number of times.
auto operator--() -> const_iterator&
Decrements the position.
auto operator--(int) -> const_iterator
Decrements the position.
auto operator-=(size_type value) -> const_iterator&
Decrements the position the given number of times.
auto operator*() const -> const_reference
Returns a const reference to the pointed value.
auto operator->() const -> const_pointer
Returns a const pointer to the pointed value.
auto operator[](size_type offset) const -> const_reference
Returns a const reference to the pointed value by this iterator incremented offset times.

Friends

auto operator+(const const_iterator& it, size_type offset) -> const_iterator
Returns the iterator it incremented offset times.
auto operator+(size_type offset, const const_iterator& it) -> const_iterator
Returns the iterator it incremented offset times.
auto operator-(const const_iterator& it, size_type offset) -> const_iterator
Returns the iterator it decremented offset times.
auto operator-(size_type offset, const const_iterator& it) -> const_iterator
Returns the iterator it decremented offset times.
auto operator+(const const_iterator& a, const const_iterator& b) -> size_type
Returns the sum of a and b.
auto operator-(const const_iterator& a, const const_iterator& b) -> size_type
Returns b subtracted from a.
auto operator==(const const_iterator& a, const const_iterator& b) -> bool
Equal operator.
auto operator!=(const const_iterator& a, const const_iterator& b) -> bool
Not equal operator.
auto operator<(const const_iterator& a, const const_iterator& b) -> bool
Less than operator.
auto operator>(const const_iterator& a, const const_iterator& b) -> bool
Greater than operator.
auto operator<=(const const_iterator& a, const const_iterator& b) -> bool
Less than or equal operator.
auto operator>=(const const_iterator& a, const const_iterator& b) -> bool
Greater than or equal operator.

Function documentation

bn::ideque::const_iterator::const_iterator(const iterator& it)

Public constructor.

Parameters
it Non const iterator.

const_iterator& bn::ideque::const_iterator::operator++()

Increments the position.

Returns Reference to this.

const_iterator bn::ideque::const_iterator::operator++(int)

Increments the position.

Returns The iterator before being incremented.

const_iterator& bn::ideque::const_iterator::operator+=(size_type value)

Increments the position the given number of times.

Parameters
value Number of positions to increment.
Returns Reference to this.

const_iterator& bn::ideque::const_iterator::operator--()

Decrements the position.

Returns Reference to this.

const_iterator bn::ideque::const_iterator::operator--(int)

Decrements the position.

Returns The iterator before being decremented.

const_iterator& bn::ideque::const_iterator::operator-=(size_type value)

Decrements the position the given number of times.

Parameters
value Number of positions to decrement.
Returns Reference to this.

bool operator==(const const_iterator& a, const const_iterator& b)

Equal operator.

Parameters
a First const_iterator to compare.
b Second const_iterator to compare.
Returns true if the first const_iterator is equal to the second one, otherwise false.

bool operator!=(const const_iterator& a, const const_iterator& b)

Not equal operator.

Parameters
a First const_iterator to compare.
b Second const_iterator to compare.
Returns true if the first const_iterator is not equal to the second one, otherwise false.

bool operator<(const const_iterator& a, const const_iterator& b)

Less than operator.

Parameters
a First const_iterator to compare.
b Second const_iterator to compare.
Returns true if the first const_iterator is lexicographically less than the second one, otherwise false.

bool operator>(const const_iterator& a, const const_iterator& b)

Greater than operator.

Parameters
a First const_iterator to compare.
b Second const_iterator to compare.
Returns true if the first const_iterator is lexicographically greater than the second one, otherwise false.

bool operator<=(const const_iterator& a, const const_iterator& b)

Less than or equal operator.

Parameters
a First const_iterator to compare.
b Second const_iterator to compare.
Returns true if the first const_iterator is lexicographically less than or equal to the second one, otherwise false.

bool operator>=(const const_iterator& a, const const_iterator& b)

Greater than or equal operator.

Parameters
a First const_iterator to compare.
b Second const_iterator to compare.
Returns true if the first const_iterator is lexicographically greater than or equal to the second one, otherwise false.