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::reference
Reference alias.
using const_reference = ideque::const_reference
Const reference alias.
using pointer = ideque::pointer
Pointer alias.
using const_pointer = ideque::const_pointer
Const pointer alias.
using iterator_category = random_access_iterator_tag
Iterator category alias.

Constructors, destructors, conversion operators

const_iterator(const iterator& it)
Public constructor.

Public functions

auto operator++() -> 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-=(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.

Friends

auto operator+(const const_iterator& a, size_type b) -> const_iterator
Returns a incremented b times.
auto operator-(const const_iterator& a, size_type b) -> const_iterator
Returns a decremented b 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+=(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-=(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.