3#ifndef TETL_ITERATOR_BACK_INSERT_ITERATOR_HPP
4#define TETL_ITERATOR_BACK_INSERT_ITERATOR_HPP
6#include <etl/_cstddef/ptrdiff_t.hpp>
7#include <etl/_iterator/tags.hpp>
8#include <etl/_memory/addressof.hpp>
9#include <etl/_utility/move.hpp>
18template <
typename Container>
21 using value_type =
void;
22 using difference_type = ptrdiff_t;
24 using reference =
void;
25 using container_type = Container;
33 : _container{
etl::addressof(container)}
40 _container->push_back(value);
47 _container->push_back(
etl::move(value));
79 Container* _container =
nullptr;
85template <
typename Container>
Definition adjacent_find.hpp:9
constexpr auto back_inserter(Container &container) -> back_insert_iterator< Container >
back_inserter is a convenience function template that constructs a back_insert_iterator for the conta...
Definition back_insert_iterator.hpp:86
etl::back_insert_iterator is a LegacyOutputIterator that appends to a container for which it was cons...
Definition back_insert_iterator.hpp:19
constexpr back_insert_iterator(Container &container)
Initializes the underlying pointer to the container to etl::addressof(c).
Definition back_insert_iterator.hpp:32
constexpr auto operator*() -> back_insert_iterator &
Does nothing, this member function is provided to satisfy the requirements of LegacyOutputIterator....
Definition back_insert_iterator.hpp:55
constexpr back_insert_iterator() noexcept=default
Initializes the underlying pointer to container with nullptr.
constexpr auto operator=(typename Container::value_type const &value) -> back_insert_iterator &
Inserts the given value value to the container.
Definition back_insert_iterator.hpp:38
constexpr auto operator++(int) -> back_insert_iterator
Does nothing. These operator overloads are provided to satisfy the requirements of LegacyOutputIterat...
Definition back_insert_iterator.hpp:73
constexpr auto operator++() -> back_insert_iterator &
Does nothing. These operator overloads are provided to satisfy the requirements of LegacyOutputIterat...
Definition back_insert_iterator.hpp:64
constexpr auto operator=(typename Container::value_type &&value) -> back_insert_iterator &
Inserts the given value value to the container.
Definition back_insert_iterator.hpp:45
Defines the category of an iterator. Each tag is an empty type and corresponds to one of the five (un...
Definition tags.hpp:19