Lines Matching defs:random_access_iterator
189 class random_access_iterator
193 template <class U> friend class random_access_iterator;
203 random_access_iterator() : it_() {}
204 explicit random_access_iterator(It it) : it_(it) {}
206 random_access_iterator(const random_access_iterator<U>& u) :it_(u.it_) {}
211 random_access_iterator& operator++() {++it_; return *this;}
212 random_access_iterator operator++(int)
213 {random_access_iterator tmp(*this); ++(*this); return tmp;}
215 random_access_iterator& operator--() {--it_; return *this;}
216 random_access_iterator operator--(int)
217 {random_access_iterator tmp(*this); --(*this); return tmp;}
219 random_access_iterator& operator+=(difference_type n) {it_ += n; return *this;}
220 random_access_iterator operator+(difference_type n) const
221 {random_access_iterator tmp(*this); tmp += n; return tmp;}
222 friend random_access_iterator operator+(difference_type n, random_access_iterator x)
224 random_access_iterator& operator-=(difference_type n) {return *this += -n;}
225 random_access_iterator operator-(difference_type n) const
226 {random_access_iterator tmp(*this); tmp -= n; return tmp;}
234 operator==(const random_access_iterator<T>& x, const random_access_iterator<U>& y)
242 operator!=(const random_access_iterator<T>& x, const random_access_iterator<U>& y)
250 operator<(const random_access_iterator<T>& x, const random_access_iterator<U>& y)
258 operator<=(const random_access_iterator<T>& x, const random_access_iterator<U>& y)
266 operator>(const random_access_iterator<T>& x, const random_access_iterator<U>& y)
274 operator>=(const random_access_iterator<T>& x, const random_access_iterator<U>& y)
282 operator-(const random_access_iterator<T>& x, const random_access_iterator<U>& y)
300 inline Iter base(random_access_iterator<Iter> i) { return i.base(); }