bn::iunordered_set::iterator class

Non const iterator.

In contrast to std::unordered_set::iterator, this one is bidirectional.

Public types

using key_type = iunordered_set::key_type
Key type alias.
using value_type = iunordered_set::value_type
Value type alias.
using size_type = iunordered_set::size_type
Size type alias.
using difference_type = iunordered_set::difference_type
Difference type alias.
using hash_type = iunordered_set::hash_type
Hash type alias.
using hasher = iunordered_set::hasher
Hash functor alias.
using key_equal = iunordered_set::key_equal
Equality functor alias.
using reference = iunordered_set::reference
Reference alias.
using pointer = iunordered_set::pointer
Pointer alias.
using iterator_category = bidirectional_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--() -> iterator&
Decrements the position.
auto operator--(int) -> iterator
Decrements the position.
auto operator*() const -> reference
Returns a reference to the pointed value.
auto operator->() const -> pointer
Returns a pointer to the pointed value.

Friends

auto operator==(const iterator& a, const iterator& b) -> bool
Equal operator.
auto operator!=(const iterator& a, const iterator& b) -> bool
Not equal operator.

Function documentation

iterator& bn::iunordered_set::iterator::operator++()

Increments the position.

Returns Reference to this.

iterator bn::iunordered_set::iterator::operator++(int)

Increments the position.

Returns The iterator before being incremented.

iterator& bn::iunordered_set::iterator::operator--()

Decrements the position.

Returns Reference to this.

iterator bn::iunordered_set::iterator::operator--(int)

Decrements the position.

Returns The iterator before being decremented.

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.