tetl 0.1.0
Embedded Template Library
|
front_insert_iterator is an LegacyOutputIterator that prepends elements to a container for which it was constructed. More...
#include <front_insert_iterator.hpp>
Public Types | |
using | container_type = Container |
using | difference_type = void |
using | iterator_category = output_iterator_tag |
using | pointer = void |
using | reference = void |
using | value_type = void |
Public Member Functions | |
constexpr | front_insert_iterator () noexcept=default |
Initializes the underlying pointer to container with nullptr. | |
constexpr | front_insert_iterator (Container &container) |
Initializes the underlying pointer to the container to addressof(c). | |
constexpr auto | operator* () -> front_insert_iterator & |
Does nothing, this member function is provided to satisfy the requirements of LegacyOutputIterator. It returns the iterator itself, which makes it possible to use code such as *iter = value to output (insert) the value into the underlying container. | |
constexpr auto | operator++ () -> front_insert_iterator & |
Does nothing. These operator overloads are provided to satisfy the requirements of LegacyOutputIterator. They make it possible for the expressions *iter++=value and *++iter=value to be used to output (insert) a value into the underlying container. | |
constexpr auto | operator++ (int) -> front_insert_iterator |
Does nothing. These operator overloads are provided to satisfy the requirements of LegacyOutputIterator. They make it possible for the expressions *iter++=value and *++iter=value to be used to output (insert) a value into the underlying container. | |
constexpr auto | operator= (typename Container::value_type &&value) -> front_insert_iterator & |
Inserts the given value value to the container. | |
constexpr auto | operator= (typename Container::value_type const &value) -> front_insert_iterator & |
Inserts the given value value to the container. | |
Protected Attributes | |
Container * | _container = nullptr |
front_insert_iterator is an LegacyOutputIterator that prepends elements to a container for which it was constructed.
The container's push_front() member function is called whenever the iterator (whether dereferenced or not) is assigned to. Incrementing the front_insert_iterator is a no-op.
|
constexprdefaultnoexcept |
Initializes the underlying pointer to container with nullptr.
|
inlineexplicitconstexpr |
Initializes the underlying pointer to the container to addressof(c).
|
inlineconstexpr |
Does nothing, this member function is provided to satisfy the requirements of LegacyOutputIterator. It returns the iterator itself, which makes it possible to use code such as *iter = value to output (insert) the value into the underlying container.
|
inlineconstexpr |
Does nothing. These operator overloads are provided to satisfy the requirements of LegacyOutputIterator. They make it possible for the expressions *iter++=value and *++iter=value to be used to output (insert) a value into the underlying container.
|
inlineconstexpr |
Does nothing. These operator overloads are provided to satisfy the requirements of LegacyOutputIterator. They make it possible for the expressions *iter++=value and *++iter=value to be used to output (insert) a value into the underlying container.
|
inlineconstexpr |
Inserts the given value value to the container.
|
inlineconstexpr |
Inserts the given value value to the container.