Skip to content

Commit

Permalink
vecvec::const_bucket::rbegin/rend
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Jul 29, 2024
1 parent ed85cb2 commit e1be97b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/cista/containers/vecvec.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,13 @@ struct basic_vecvec {
friend const_iterator begin(const_bucket const& b) { return b.begin(); }
friend const_iterator end(const_bucket const& b) { return b.end(); }

std::reverse_iterator<const_iterator> rbegin() const {
return std::reverse_iterator{begin() + size()};
}
std::reverse_iterator<const_iterator> rend() const {
return std::reverse_iterator{begin()};
}

friend bool operator==(const_bucket const& a, const_bucket const& b) {
assert(a.map_ == b.map_);
return a.i_ == b.i_;
Expand Down

0 comments on commit e1be97b

Please sign in to comment.