Template Class bpq_iterator¶
Defined in File bpqueue.hpp
Page Contents
Template Parameter Order¶
typename _Tp
typename Int
Class Documentation¶
-
template<typename _Tp, typename Int = int32_t>
class bpq_iterator¶ Bounded Priority Queue Iterator.
Bounded Priority Queue Iterator. Traverse the queue in descending order. Detaching queue items may invalidate the iterator because the iterator makes a copy of current key.
Public Functions
-
inline constexpr bpq_iterator(bpqueue<_Tp, Int> &bpq, UInt curkey)¶
Construct a new bpq iterator object.
- Parameters
bpq – [in]
curkey – [in]
-
inline constexpr auto operator++() -> bpq_iterator&¶
move to the next item
- Returns
-
inline constexpr auto operator*() -> Item&¶
get the reference of the current item
- Returns
Friends
- inline friend friend constexpr auto operator== (const bpq_iterator &lhs, const bpq_iterator &rhs) -> bool
eq operator
- Parameters
rhs – [in]
- Returns
true
- Returns
false
- inline friend friend constexpr auto operator!= (const bpq_iterator &lhs, const bpq_iterator &rhs) -> bool
neq operator
- Parameters
rhs – [in]
- Returns
true
- Returns
false
-
inline constexpr bpq_iterator(bpqueue<_Tp, Int> &bpq, UInt curkey)¶