indirect_iterator adapts an iterator by applying an
extra dereference inside of operator*(). For example, this
iterator adaptor makes it possible to view a container of pointers
(e.g. list<foo*>) as if it were a container of the pointed-to type
(e.g. list<foo>). indirect_iterator depends on two
auxiliary traits, pointee and indirect_reference, to
provide support for underlying iterators whose value_type is
not an iterator.

The expression *v, where v is an object of
iterator_traits<Iterator>::value_type, shall be valid
expression and convertible to reference. Iterator shall
model the traversal concept indicated by iterator_category.
Value, Reference, and Difference shall be chosen so
that value_type, reference, and difference_type meet
the requirements indicated by iterator_category.

[Note: there are further requirements on the
iterator_traits<Iterator>::value_type if the Value
parameter is not use_default, as implied by the algorithm for
deducing the default for the value_type member.]

In addition to the concepts indicated by iterator_category
and by iterator_traversal<indirect_iterator>::type, a
specialization of indirect_iterator models the following
concepts, Where v is an object of
iterator_traits<Iterator>::value_type:

Readable Iterator if reference(*v) is convertible to
value_type.

Writable Iterator if reference(*v)=t is a valid
expression (where t is an object of type
indirect_iterator::value_type)

Lvalue Iterator if reference is a reference type.

indirect_iterator<X,V1,C1,R1,D1> is interoperable with
indirect_iterator<Y,V2,C2,R2,D2> if and only if X is
interoperable with Y.

This example prints an array of characters, using
indirect_iterator to access the array of characters through an
array of pointers. Next indirect_iterator is used with the
transform algorithm to copy the characters (incremented by one) to
another array. A constant indirect iterator is used for the source and
a mutable indirect iterator is used for the destination. The last part
of the example prints the original array of characters, but this time
using the make_indirect_iterator helper function.