Skip to content

Commit

Permalink
ASE: queuemux.hh: properly check for more() in iterator equality oper…
Browse files Browse the repository at this point in the history
…ator

Signed-off-by: Tim Janik <[email protected]>
  • Loading branch information
tim-janik committed Nov 17, 2023
1 parent 0ec03eb commit b63bb57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ase/queuemux.hh
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ struct QueueMultiplexer {
using reference = const value_type&;
using iterator_category = std::input_iterator_tag;
/*ctor*/ Iter (QueueMultiplexer *u = nullptr) : mux_ (u && u->more() ? u : nullptr) {}
bool oob () const { return !mux_; }
friend bool operator== (const Iter &a, const Iter &b) { return a.mux_ == b.mux_; }
bool more () const { return mux_ && mux_->more(); }
friend bool operator== (const Iter &a, const Iter &b) { return a.more() == b.more(); }
value_type& operator* () const { return mux_ ? mux_->peek() : empty(); }
Iter operator++ (int) { Iter copy (*this); this->operator++(); return copy; }
Iter& operator++ ()
Expand Down

0 comments on commit b63bb57

Please sign in to comment.