3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/insert-range.html
| Prev Next | Back Along | Up Home | Full TOC | Front Page / Sequences / Intrinsic Metafunctions / insert_range |
template<
typename Sequence
, typename Pos
, typename Range
>
struct[insert\_range](./insert-range.html){
typedef_unspecified_type;
};
insert_range performs an insertion of a range of elements at an arbitrary position in the sequence.
#include <[boost/mpl/insert\_range.hpp](../../../../boost/mpl/insert_range.hpp)>
| Parameter | Requirement | Description |
|---|---|---|
| Sequence | Extensible Sequence or Extensible Associative Sequence | A sequence to insert into. |
| Pos | Forward Iterator | An iterator in Sequence specifying the insertion position. |
| Range | Forward Sequence | The range of elements to be inserted. |
For any Extensible Sequence s, iterator pos in s, and Forward Sequence range:
typedef[insert](./insert.html)<s,pos,range>::type r;
| Return type: |
| | Precondition: |
pos is an iterator into s.
| | Semantics: |
r is a sequence, concept-identical to s, of the following elements: [begin<s>::type, pos), [begin<r>::type, end<r>::type), [pos, end<s>::type).
| | Postcondition: |
The relative order of the elements in r is the same as in s;
[size](./size.html)<r>::value ==[size](./size.html)<s>::value +[size](./size.html)<range>::value
|
Sequence dependent. Quadratic in the worst case, linear at best; see the particular sequence class' specification for details.
typedef[vector\_c](./vector-c.html)<int,0,1,7,8,9> numbers;
typedef[find](./find.html)< numbers,[integral\_c](./integral-c.html)<int,7> >::type pos;
typedef[insert\_range](./insert-range.html)< numbers,pos,[range\_c](./range-c.html)<int,2,7> >::type range;[BOOST\_MPL\_ASSERT\_RELATION](./assert-relation.html)([size](./size.html)<range>::value, ==, 10 );[BOOST\_MPL\_ASSERT](./assert.html)(([equal](./equal.html)< range,[range\_c](./range-c.html)<int,0,10> > ));
typedef[insert\_range](./insert-range.html)<[list](./list.html)0<>
,[end](./end.html)<[list](./list.html)0<> >::type
,[list](./list.html)<int>
>::type result2;[BOOST\_MPL\_ASSERT\_RELATION](./assert-relation.html)([size](./size.html)<result2>::value, ==, 1 );
Extensible Sequence, insert, push_front, push_back, erase
| Prev Next | Back Along | Up Home | Full TOC |
Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |