< cpp‎ | iterator
Revision as of 23:05, 31 May 2013 by P12bot (Talk | contribs)

Defined in header <iterator>

    class Category,
    class T,
    class Distance = std::ptrdiff_t,
    class Pointer = T*,
    class Reference = T&

> struct iterator;

std::iterator is the base class provided to simplify definitions of the required types for iterators.

Template parameters

Category - the category of the iterator. Must be one of iterator category tags.
T - the type of the elements the iterator refers to
Distance - a type that can be used to identify distance between iterators
Pointer - defines a pointer to the type iterated over (T)
Reference - defines a reference to the type iterated over (T)

Member types

Member type Definition
value_type T
difference_type Distance
pointer Pointer
reference Reference
iterator_category Category

See also

provides uniform interface to the properties of an iterator
(class template) [edit]
empty class types used to indicate iterator categories
(class) [edit]