Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Rogue Wave C++ Standard Library Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

back_insert_iterator, back_inserter()

Module:  Standard C++ Library   Library:  Iterators


back_insert_iterator iterator

Local Index

Members

Summary

An output iterator used to insert items at the end of a collection

Synopsis

#include <iterator>

namespace std {
  template <class Container> 
  class back_insert_iterator;
}

Description

Insert iterators let you insert new elements into a collection rather than copy a new element's value over the value of an existing element. The class template specialization back_insert_iterator is used to insert items at the end of a collection. The convenience function template back_inserter() creates an instance of a back_insert_iterator for a particular collection type. A back_insert_iterator can be used with any container that defines the push_back() member function, specifically all sequences (e.g., vector, deque, basic_string, and list), but not with associative containers (e.g., map or set).

Interface

Member Types

container_type

Constructors

explicit
back_insert_iterator (container_type& x);

Operators

back_insert_iterator&
operator= (const typename container_type::constant_reference value);
back_insert_iterator&
operator* ();
back_insert_iterator& 
operator* ();
back_insert_iterator& 
operator++ ();
back_insert_iterator 
operator++ (int);

Helper Functions

template <class Container>
back_insert_iterator<Container>
back_inserter (Container& x)

Example

See Also

Insert Iterators

Standards Conformance

ISO/IEC 14882:1998 -- International Standard for Information Systems -- Programming Language C++, Section 24.4.2.1



Previous fileTop of DocumentContentsIndex pageNext file

Copyright (c) 1994-2006 Rogue Wave Software, a Quovadx Division.
Licensed under the Apache License, Version 2.0.
Contact Rogue Wave about documentation or support issues. You can also seek help from other developers through the Apache stdcxx community (see below).

For more information on the Rogue Wave Standard C++ Library under open source, see Section 1.2 of the user's guide.