[insert.iter.ops]

# 24 Iterators library [[iterators]](./#iterators)

## 24.5 Iterator adaptors [[predef.iterators]](predef.iterators#insert.iter.ops)

### 24.5.2 Insert iterators [[insert.iterators]](insert.iterators#insert.iter.ops)

#### 24.5.2.4 Class template insert_iterator [[insert.iterator]](insert.iterator#insert.iter.ops)

#### 24.5.2.4.2 Operations [insert.iter.ops]

[ð](#lib:insert_iterator,constructor)

`constexpr insert_iterator(Container& x, ranges::iterator_t<Container> i);
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L4090)

*Effects*: Initializescontainer with addressof(x) anditer with i[.](#1.sentence-1)

[ð](#lib:operator=,insert_iterator)

`constexpr insert_iterator& operator=(const typename Container::value_type& value);
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L4105)

*Effects*: As if by:iter = container->insert(iter, value);++iter;

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L4113)

*Returns*: *this[.](#3.sentence-1)

[ð](#lib:operator=,insert_iterator_)

`constexpr insert_iterator& operator=(typename Container::value_type&& value);
`

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L4124)

*Effects*: As if by:iter = container->insert(iter, std::move(value));++iter;

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L4132)

*Returns*: *this[.](#5.sentence-1)

[ð](#lib:operator*,insert_iterator)

`constexpr insert_iterator& operator*();
`

[6](#6)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L4143)

*Returns*: *this[.](#6.sentence-1)

[ð](#lib:operator++,insert_iterator)

`constexpr insert_iterator& operator++();
constexpr insert_iterator& operator++(int);
`

[7](#7)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iterators.tex#L4155)

*Returns*: *this[.](#7.sentence-1)
