Parameter Description
Container The type of Container into which values will be inserted.
Model of

Output Iterator. An insert iterator's set of value types (as defined in the Output Iterator requirements) consists of a single type: Container::value_type.

Type requirements

• The template parameter Container is a model of Container.

• Container is variable-sized, as described in the Container requirements.

• Container has a two-argument insert member function. Specifically, if c is an object of type Container, p is an object of type Container::iterator and v is an object of type Container::value_type, then c.insert(p, v) must be a valid expression.

Public base classes

None.

Members
Member Where defined Description
insert_iterator(Container&, Container::iterator) insert_iterator See below.
insert_iterator(const insert_iterator&) Trivial Iterator The copy constructor
insert_iterator& operator=(const insert_iterator&) Trivial Iterator The assignment operator
insert_iterator& operator*() Output Iterator Used to implement the output iterator expression *i = x. [2]
insert_iterator& operator=(const Container::value_type&) Output Iterator Used to implement the output iterator expression *i = x. [2]
insert_iterator& operator++() Output Iterator Preincrement.
insert_iterator& operator++(int) Output Iterator Postincrement.
output_iterator_tag iterator_category(const insert_iterator&) iterator tags Returns the iterator's category. This is a global function, not a member.
template<class Container, class Iter) insert_iterator<Container> inserter(Container& C, Iter i); insert_iterator See below.
New members

These members are not defined in the Output Iterator requirements, but are specific to insert_iterator.

Member Description
insert_iterator(Container& C, Container::iterator i) Constructs an insert_iterator that inserts objects in C. If Container is a Sequence, then each object will be inserted immediately before the element pointed to by i. If C is a Sorted Associative Container, then the first insertion will use i as a hint for beginning the search. The iterator i must be a dereferenceable or past-the-end iterator in C.
Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату