• Home
  • Raw
  • Download

Lines Matching refs:Iterator

113 template<class T> class Iterator : public std::iterator<std::random_access_iterator_tag, T> {
121 Iterator(const Iterator&) = default;
122 Iterator(Iterator&&) noexcept = default;
123 Iterator& operator=(const Iterator&) = default;
124 Iterator& operator=(Iterator&&) noexcept = default;
126 Iterator(const std::vector<T>& vector, in Iterator() function
132 Iterator() : vector_(nullptr), position_(0U), iterator_end_(0U) { } in Iterator() function
136 bool operator==(const Iterator& rhs) const { return position_ == rhs.position_; }
137 bool operator!=(const Iterator& rhs) const { return !(*this == rhs); }
138 bool operator<(const Iterator& rhs) const { return position_ < rhs.position_; }
139 bool operator>(const Iterator& rhs) const { return rhs < *this; }
140 bool operator<=(const Iterator& rhs) const { return !(rhs < *this); }
141 bool operator>=(const Iterator& rhs) const { return !(*this < rhs); }
143 Iterator& operator++() { // Value after modification.
148 Iterator operator++(int) {
149 Iterator temp = *this;
154 Iterator& operator+=(difference_type delta) {
159 Iterator operator+(difference_type delta) const {
160 Iterator temp = *this;
165 Iterator& operator--() { // Value after modification.
170 Iterator operator--(int) {
171 Iterator temp = *this;
176 Iterator& operator-=(difference_type delta) {
181 Iterator operator-(difference_type delta) const {
182 Iterator temp = *this;
187 difference_type operator-(const Iterator& rhs) {
209 friend bool operator<(const Iterator<U>& lhs, const Iterator<U>& rhs);
250 Iterator<ElementType> begin() const { return Iterator<ElementType>(collection_, 0U, Size()); } in begin()
251 Iterator<ElementType> end() const { return Iterator<ElementType>(collection_, Size(), Size()); } in end()