These members are not defined in the Output Iterator requirements, but are specific to
| Function | Description |
|---|---|
| Creates an | |
| Creates an |
[1] Note how assignment through an
istream_iterator, Output Iterator, Input Iterator.
front_insert_iterator<FrontInsertionSequence>
Categories: iterators, adaptors
Component type: type
list<int> L;
L.push_front(3);
front_insert_iterator<list<int> > ii(L);
*ii++ = 0;
*ii++ = 1;
*ii++ = 2;
copy(L.begin(), L.end(), ostream_iterator<int>(cout, ' '));
// The values that are printed are 2 1 0 3
Defined in the standard header iterator, and in the nonstandard backward-compatibility header iterator.h.
| Parameter | Description |
|---|---|
FrontInsertionSequence | The type of Front Insertion Sequence into which values will be inserted. |
Output Iterator. A front insert iterator's set of value types (as defined in the Output Iterator requirements) consists of a single type:
The template parameter
None.
| Member | Where defined | Description |
|---|---|---|
front_insert_iterator(FrontInsertionSequence&) | front_insert_iterator | See below. |
front_insert_iterator(const front_insert_iterator&) | Trivial Iterator | The copy constructor |
front_insert_iterator& operator=(const front_insert_iterator&) | Trivial Iterator | The assignment operator |
front_insert_iterator& operator*() | Output Iterator | Used to implement the output iterator expression |
