reverse_iterator::difference_type

A type that provides the difference between two reverse_iterators referring to elements within the same container.

typedef typename iterator_traits<RandomIterator>::difference_type
   difference_type;

Remarks

The reverse_iterator difference type is the same as the iterator difference type.

The type is a synonym for the iterator trait typename iterator_traits<RandomIterator>::pointer.

Example

See reverse_iterator::operator[] for an example of how to declare and use difference_type.

Requirements

Header: <iterator>

Namespace: std

See Also

Reference

reverse_iterator Class

Standard Template Library

Other Resources

reverse_iterator Members