| Random access to an element. | ||
reverse_iterator operator+(Distance, reverse_iterator) | Random Access Iterator | Iterator addition. This is a global function, not a member function. |
Distance operator-(const reverse_iterator&, const reverse_iterator&) | Random Access Iterator | Finds the distance between two iterators. This is a global function, not a member function. |
bool operator==(const reverse_iterator&, const reverse_iterator&) | Trivial Iterator | Compares two iterators for equality. This is a global function, not a member function. |
bool operator<(const reverse_iterator&, const reverse_iterator&) | Random Access Iterator | Determines whether the first argument precedes the second. This is a global function, not a member function. |
random_access_iterator_tag iterator_category(const reverse_iterator&) | Iterator tags | Returns the iterator's category. This is a global function, not a member function. |
T* value_type(const reverse_iterator&) | Iterator tags | Returns the iterator's value type. This is a global function, not a member function. |
Distance* distance_type(const reverse_iterator&) | Iterator tags | Returns the iterator's distance type. This is a global function, not a member function. |
These members are not defined in the Random Access Iterator requirements, but are specific to
| Member | Description |
|---|---|
self | A typedef for |
RandomAccessIterator base() | Returns the current value of the |
reverse_iterator(RandomAccessIterator i) | Constructs a |
[1] There isn't really any good reason to have two separate classes: this separation is purely because of a technical limitation in some of today's C++ compilers. If the two classes were combined into one, then there would be no way to declare the return types of the iterator tag functions
[2] The declarations for
vector<T>::reverse_iterator rfirst = rbegin();
vector<T>::reverse_iterator rlast = rend();
[3] Note the implications of this remark. The variable
