![]() |
Home | Libraries | People | FAQ | More |
Returns a new sequence with another sequence inserted at a specified iterator.
template<
typename Sequence,
typename Pos,
typename Range
>
typename result_of::insert_range<Sequence const, Pos, Range>::type insert_range(
Sequence const& seq, Pos const& pos, Range const& range);
Table 1.65. Parameters
| Parameter | Requirement | Description |
|---|---|---|
seq |
A model of Forward Sequence | Operation's argument |
pos |
A model of Forward Iterator | The position to insert at |
range |
A model of Forward Sequence | Range to insert |
insert(seq, pos, range);
Return type: A model of Forward Sequence.
Semantics: Returns a new sequence, containing
all the elements of seq,
and the elements of range
inserted at iterator pos.
All elements retaining their ordering from the orignal sequences.
Constant. Returns a view which is lazily evaluated.
#include <boost/fusion/algorithm/transformation/insert_range.hpp>
constvector<int,int> vec(1,2); assert(insert_range(vec,next(begin(vec)),make_vector(3,4)) ==make_vector(1,3,4,2));
| Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger |