Standard C++ Library Class Reference
Click on the banner to return to the Class Reference home page.
©Copyright 1996 Rogue Wave Software
reverse_bidirectional_iterator, reverse_iterator
 Iterator
Summary
An iterator that traverses a collection backwards.
Contents
Synopsis● 
Description● 
Complexity● 
Interface● 
Example● 
Warning● 
See Also● 
Synopsis
#include <iterator>
template <class BidirectionalIterator,
 class T,
 class Reference = T&,
 class Pointer = T*
 class Distance = ptrdiff_t>
class reverse_bidirectional_iterator : public 
 bidirectional_iterator<T, Distance> ;
template <class RandomAccessIterator, 
 class T, 
 class Reference = T&,
 class Pointer = T*, 
 class Distance = ptrdiff_t> 
class reverse_iterator : public random_access_iterator<T, Distance>;
Description
The iterators reverse_iterator and reverse_bidirectional_iterator correspond to Random Access Iterators and
Bidirectional Iterators, except they traverse the collection they point to in the opposite direction. The fundamental
relationship between a reverse iterator and its corresponding iterator i is established by the identity:
&*(reverse_iterator(i)) == &*(i-1);










