class
#include <bn_deque.h>
iterator Non 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 pointer = ideque::
pointer - Pointer alias.
- using iterator_category = random_access_iterator_tag
- Iterator category alias.
Constructors, destructors, conversion operators
- iterator() defaulted
- Default constructor.
Public functions
- auto operator++() -> iterator&
- Increments the position.
- auto operator++(int) -> iterator
- Increments the position.
-
auto operator+=(size_
type value) -> iterator& - Increments the position the given number of times.
- auto operator--() -> iterator&
- Decrements the position.
- auto operator--(int) -> iterator
- Decrements the position.
-
auto operator-=(size_
type value) -> iterator& - Decrements the position the given number of times.
- auto operator*() const -> reference
- Returns a reference to the pointed value.
- auto operator->() const -> pointer
- Returns a pointer to the pointed value.
-
auto operator[](size_
type offset) const -> reference - Returns a reference to the pointed value by this iterator incremented offset times.
Friends
-
auto operator+(const iterator& it,
size_
type offset) -> iterator - Returns the iterator it incremented offset times.
-
auto operator+(size_
type offset, const iterator& it) -> iterator - Returns the iterator it incremented offset times.
-
auto operator-(const iterator& it,
size_
type offset) -> iterator - Returns the iterator it decremented offset times.
-
auto operator-(size_
type offset, const iterator& it) -> iterator - Returns the iterator it decremented offset times.
-
auto operator+(const iterator& a,
const iterator& b) -> size_
type - Returns the sum of a and b.
-
auto operator-(const iterator& a,
const iterator& b) -> size_
type - Returns b subtracted from a.
- auto operator==(const iterator& a, const iterator& b) -> bool
- Equal operator.
- auto operator!=(const iterator& a, const iterator& b) -> bool
- Not equal operator.
- auto operator<(const iterator& a, const iterator& b) -> bool
- Less than operator.
- auto operator>(const iterator& a, const iterator& b) -> bool
- Greater than operator.
- auto operator<=(const iterator& a, const iterator& b) -> bool
- Less than or equal operator.
- auto operator>=(const iterator& a, const iterator& b) -> bool
- Greater than or equal operator.
Function documentation
iterator bn:: ideque:: iterator:: operator++(int)
Increments the position.
Returns | The iterator before being incremented. |
---|
iterator& bn:: ideque:: iterator:: operator+=(size_ type value)
Increments the position the given number of times.
Parameters | |
---|---|
value | Number of positions to increment. |
Returns | Reference to this. |
iterator bn:: ideque:: iterator:: operator--(int)
Decrements the position.
Returns | The iterator before being decremented. |
---|
iterator& bn:: ideque:: 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 iterator& a, const iterator& b)
Equal operator.
Parameters | |
---|---|
a | First iterator to compare. |
b | Second iterator to compare. |
Returns | true if the first iterator is equal to the second one, otherwise false . |
bool operator!=(const iterator& a, const iterator& b)
Not equal operator.
Parameters | |
---|---|
a | First iterator to compare. |
b | Second iterator to compare. |
Returns | true if the first iterator is not equal to the second one, otherwise false . |
bool operator<=(const iterator& a, const iterator& b)
Less than or equal operator.
Parameters | |
---|---|
a | First iterator to compare. |
b | Second iterator to compare. |
Returns | true if the first iterator is lexicographically less than or equal to the second one, otherwise false . |
bool operator>=(const iterator& a, const iterator& b)
Greater than or equal operator.
Parameters | |
---|---|
a | First iterator to compare. |
b | Second iterator to compare. |
Returns | true if the first iterator is lexicographically greater than or equal to the second one, otherwise false . |