namespace std {
template<class Container>
class front_insert_iterator {
protected:
Container* container = nullptr;
public:
using iterator_category = output_iterator_tag;
using value_type = void;
using difference_type = ptrdiff_t;
using pointer = void;
using reference = void;
using container_type = Container;
constexpr front_insert_iterator() noexcept = default;
constexpr explicit front_insert_iterator(Container& x);
constexpr front_insert_iterator& operator=(const typename Container::value_type& value);
constexpr front_insert_iterator& operator=(typename Container::value_type&& value);
constexpr front_insert_iterator& operator*();
constexpr front_insert_iterator& operator++();
constexpr front_insert_iterator operator++(int);
};
}
constexpr explicit front_insert_iterator(Container& x);
Effects: Initializes
container
with
addressof(x). constexpr front_insert_iterator& operator=(const typename Container::value_type& value);
Effects: As if by: container->push_front(value);
constexpr front_insert_iterator& operator=(typename Container::value_type&& value);
Effects: As if by: container->push_front(std::move(value));
constexpr front_insert_iterator& operator*();
constexpr front_insert_iterator& operator++();
constexpr front_insert_iterator operator++(int);
template<class Container>
constexpr front_insert_iterator<Container> front_inserter(Container& x);
Returns: front_insert_iterator<Container>(x).