13 #ifndef RANGES_V3_ITERATOR_INSERT_ITERATORS_HPP
14 #define RANGES_V3_ITERATOR_INSERT_ITERATORS_HPP
22 #include <range/v3/utility/addressof.hpp>
24 #include <range/v3/detail/prologue.hpp>
30 template<
typename Container>
33 using container_type = Container;
34 using difference_type = std::ptrdiff_t;
38 : container_(detail::addressof(x))
42 container_->push_back(value);
47 container_->push_back(std::move(value));
64 Container * container_ =
nullptr;
69 template<
typename Container>
79 template<
typename Container>
82 using container_type = Container;
83 using difference_type = std::ptrdiff_t;
87 : container_(detail::addressof(x))
91 container_->push_front(value);
96 container_->push_front(std::move(value));
113 Container * container_ =
nullptr;
118 template<
typename Cont>
128 template<
typename Container>
131 using container_type = Container;
132 using difference_type = std::ptrdiff_t;
135 constexpr
explicit insert_iterator(Container & x,
typename Container::iterator w)
136 : container_(detail::addressof(x))
139 insert_iterator & operator=(
typename Container::value_type
const & value)
141 where_ = ranges::next(container_->insert(where_, value));
146 where_ = ranges::next(container_->insert(where_, std::move(value)));
163 Container * container_ =
nullptr;
164 typename Container::iterator where_ =
typename Container::iterator();
169 template<
typename Cont>
171 typename Cont::iterator where)
const
183 using ranges::back_inserter;
185 using ranges::front_inserter;
187 using ranges::inserter;
193 RANGES_DIAGNOSTIC_PUSH
194 RANGES_DIAGNOSTIC_IGNORE_MISMATCHED_TAGS
198 template<
typename Container>
200 : ::ranges::detail::std_output_iterator_traits<>
203 template<
typename Container>
205 : ::ranges::detail::std_output_iterator_traits<>
208 template<
typename Container>
210 : ::ranges::detail::std_output_iterator_traits<>
214 RANGES_DIAGNOSTIC_POP
217 #include <range/v3/detail/epilogue.hpp>
RANGES_INLINE_VARIABLE(detail::to_container_fn< detail::from_range< std::vector >>, to_vector) template< template< typename... > class ContT > auto to(RANGES_HIDDEN_DETAIL(detail
For initializing a container of the specified type with the elements of an Range.
Definition: conversion.hpp:399
Definition: insert_iterators.hpp:32
Definition: insert_iterators.hpp:68
Definition: insert_iterators.hpp:81
Definition: insert_iterators.hpp:117
Definition: insert_iterators.hpp:130
Definition: insert_iterators.hpp:168