< cpp‎ | iterator‎ | reverse iterator
Revision as of 20:43, 31 May 2013 by P12bot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
reverse_iterator& operator++();
reverse_iterator& operator--();
reverse_iterator operator++( int );
reverse_iterator operator--( int );
reverse_iterator operator+( difference_type n ) const;
reverse_iterator operator-( difference_type n ) const;
reverse_iterator& operator+=( difference_type n ) const;
reverse_iterator& operator-=( difference_type n ) const;

Increments or decrements the iterator. Inverse operations are applied to the underlying operator because of the reverse order.

1-2) Pre-increments or pre-decrements by one respectively.
3-4) Post-increments or post-decrements by one respectively.
5-6) Returns an iterator which is advanced by n or -n positions respectively.
7-8) Advances the iterator by n or -n positions respectively.

[edit] Return value

1) *this
2) a copy of *this that was made before the change
3) reverse_iterator(base()-n) or reverse_iterator(base()+n) respectively.
4) *this

[edit] Example

[edit] See also

advances the iterator
(function template) [edit]