template<typename Tp, typename Int = int32_t>
BpqIterator class

Bounded Priority Queue Iterator.

Traverse the queue in descending order. Detaching a queue items may invalidate the iterator because the iterator makes a copy of the current key.

Constructors, destructors, conversion operators

BpqIterator(BPQueue<Tp, Int>& bpq, UInt curkey) constexpr
Construct a new bpq iterator object.

Public functions

auto operator++() -> BpqIterator & -> auto constexpr
Move to the next item.
auto operator*() -> Item & -> auto constexpr
Get the reference of the current item.

Friends

auto operator==(const BpqIterator& lhs, const BpqIterator& rhs) -> bool -> friend auto constexpr
eq operator
auto operator!=(const BpqIterator& lhs, const BpqIterator& rhs) -> bool -> friend auto constexpr
neq operator

Function documentation

template<typename Tp, typename Int>
BpqIterator<Tp, Int>::BpqIterator(BPQueue<Tp, Int>& bpq, UInt curkey) constexpr

Construct a new bpq iterator object.

Parameters
bpq in
curkey in

template<typename Tp, typename Int>
auto BpqIterator<Tp, Int>::operator++() -> BpqIterator & constexpr

Move to the next item.

Returns BpqIterator&

template<typename Tp, typename Int>
auto BpqIterator<Tp, Int>::operator*() -> Item & constexpr

Get the reference of the current item.

Returns Item&

template<typename Tp, typename Int>
friend auto operator==(const BpqIterator& lhs, const BpqIterator& rhs) -> bool constexpr

eq operator

Parameters
lhs in
rhs in
Returns true

template<typename Tp, typename Int>
friend auto operator!=(const BpqIterator& lhs, const BpqIterator& rhs) -> bool constexpr

neq operator

Parameters
lhs in
rhs in
Returns true