Generic algorithms often require a target container into which the results of
the algorithm are deposited. For example, the link(tt(copy))(COPY) generic
algorithm has three parameters. The first two define the range of visited
elements, the third defines the first position where the results
of the copy operation should be stored.

With the tt(copy) algorithm the number of elements to copy is usually
available beforehand, since that number can usually be provided by pointer
arithmetic. However, situations exist where pointer arithmetic cannot be
used. Analogously, the number of resulting elements sometimes differs from the
number of elements in the initial range. The generic algorithm
link(tt(unique_copy))(UNIQUECP) is a case in point. Here the number of
elements that are copied to the destination container is normally not known
beforehand.

    In situations like these an emi(inserter) hi(adapter: inserter) adapter
function can often be used to create elements in the destination container.
There are three types of inserter adapters:
    itemization(
    iti(back_inserter): calls the container's ti(push_back) member to add
new elements at the end of the container. E.g., to copy all elements of
tt(source) in reversed order to the back of tt(destination), using the
link(tt(copy))(COPY) generic algorithm:
        verb(copy(source.rbegin(), source.rend(), back_inserter(destination));)

iti(front_inserter) calls the container's ti(push_front) member, adding
new elements at the beginning of the container. E.g., to copy all elements of
tt(source) to the front of the destination container (thereby also reversing
the order of the elements):
        verb(copy(source.begin(), source.end(), front_inserter(destination));)

iti(inserter) calls the container's ti(insert) member adding new elements
starting at a specified starting point. E.g., to copy all elements of
tt(source) to the destination container, starting at the beginning of
tt(destination), shifting up existing elements to beyond the newly inserted
elements:
        verb(copy(source.begin(), source.end(), inserter(destination,
    destination.begin()));)
    )
    The inserter adapters
 hi(adapter: required types) hi(inserter: required types)
 require the existence of two types:
    itemization(
    itt(using value_type = Data), where tt(Data) is the data type stored in
the class offering tt(push_back, push_front) or tt(insert) members (Example:
tt(using value_type = std::string));
    itt(using const_reference = const &value_type)
    )
    Concentrating on tt(back_inserter), this iterator expects the name of a
container supporting a member tt(push_back). The inserter's tt(operator())
member calls the container's tt(push_back) member. Objects
 hi(inserter: and non-STL classes) of any class supporting a tt(push_back)
member can be passed as arguments to tt(back_inserter) provided the class adds
        verb(    using const_reference = DataType const &;)

to its interface (where tt(DataType const &) is the type of the parameter
of the class's member tt(push_back)). Example:
        verbinclude(-a examples/backinserter.cc)
