Regular iterators operate on a certain type of objects, which have already been constructed. A raw_storage_iterator wraps one of these regular iterators into a special output iterator which constructs objects at the location being pointed before being written.
It is defined as:
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
Template parameters
- OutputIterator
- Underlying iterator type.
- T
- Type of objects to be constructed on each element location.
Member functions
- constructor
- raw_storage_iterator objects are constructed from an iterator.
- operator*
- Does nothing. Returns a reference to the object.
- operator=
- Constructs a new object of type T at the location pointed by the iterator and initializes its value to a copy of the argument used as right-hand side of the operator.
- operator++
- Increases the iterator location.
Example
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|
Output:
first second third |
See also
| get_temporary_buffer | Get block of temporary memory (function template) |
| uninitialized_copy | Copy block of memory (function template) |
| iterator | Iterator definitions (header) |
