Embedded Template Library 1.0
|
Turns assignment into insertion. More...
#include <iterator.h>
Public Types | |
typedef TContainer | container_type |
A nested typedef for the type of whatever container you used. | |
![]() | |
typedef void | value_type |
typedef void | difference_type |
typedef void | pointer |
typedef void | reference |
typedef ETL_OR_STD::output_iterator_tag | iterator_category |
Public Member Functions | |
ETL_CONSTEXPR14 | front_insert_iterator (TContainer &c) |
ETL_CONSTEXPR14 front_insert_iterator & | operator= (const typename TContainer::value_type &value) |
ETL_NODISCARD ETL_CONSTEXPR14 front_insert_iterator & | operator* () |
ETL_CONSTEXPR14 front_insert_iterator & | operator++ () |
ETL_CONSTEXPR14 front_insert_iterator | operator++ (int) |
Protected Attributes | |
TContainer * | container |
Turns assignment into insertion.
These are output iterators, constructed from a container-of-T. Assigning a T to the iterator prepends it to the container using push_front.
Tip: Using the front_inserter function to create these iterators can save typing.
TContainer | The container type. |
|
inlineexplicit |
Constructor The only way to create this iterator is with a container.
|
inline |
Dereference operator. Simply returns *this.
|
inline |
Pre-increment operator. Simply returns *this. (This iterator does not move.)
|
inline |
Post-increment operator. Simply returns *this. (This iterator does not move.)
|
inline |
This kind of iterator doesn't really have a position in the container (you can think of the position as being permanently at the front, if you like). Assigning a value to the iterator will always prepend the value to the front of the container.
value | An instance of whatever type container_type::const_reference is; presumably a reference-to-const T for container<T>. |