insert_iterator

template<class Cont>
    class insert_iterator
        : public iterator<output_iterator_tag, void, void> {
public:
    typedef Cont container_type;
    typedef Cont::value_type value_type;
    explicit insert_iterator(Cont& x, Cont::iterator it);
    insert_iterator& operator=(const Cont::value_type& val);
    insert_iterator& operator*();
    insert_iterator& operator++();
    insert_iterator& operator++(int);
protected:
    Cont& container;
    Cont::iterator iter;
    };

The template class describes an output iterator object. It inserts elements into a container of type Cont, which it accesses via the protected reference object it stores called container. It also stores the protected iterator object, of class Cont::iterator, called iter. The container must define: