2010-12-22 22:31:33 +00:00
|
|
|
[/
|
|
|
|
Copyright 2010 Neil Groves
|
|
|
|
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)
|
|
|
|
/]
|
2010-03-28 16:08:35 +00:00
|
|
|
[section:insert insert]
|
|
|
|
|
|
|
|
[heading Prototype]
|
|
|
|
|
|
|
|
``
|
|
|
|
template<
|
|
|
|
class Container,
|
|
|
|
class SinglePassRange
|
2014-03-08 21:42:42 +00:00
|
|
|
>
|
2010-04-11 22:05:02 +00:00
|
|
|
Container& insert(Container& target,
|
|
|
|
typename Container::iterator before,
|
|
|
|
const SinglePassRange& from);
|
2014-03-08 21:42:42 +00:00
|
|
|
|
|
|
|
// This overload is for target containers that do not require an insertion
|
|
|
|
// position e.g. set/map
|
|
|
|
template<
|
|
|
|
class Container,
|
|
|
|
class SinglePassRange
|
|
|
|
>
|
|
|
|
Container& insert(Container& target, const SinglePassRange& from);
|
2010-03-28 16:08:35 +00:00
|
|
|
``
|
|
|
|
|
|
|
|
[heading Description]
|
|
|
|
|
|
|
|
`insert` all of the elements in the range `from` before the `before` iterator into `target`.
|
|
|
|
|
|
|
|
[heading Definition]
|
|
|
|
|
|
|
|
Defined in the header file `boost/range/algorithm_ext/insert.hpp`
|
|
|
|
|
|
|
|
[heading Requirements]
|
|
|
|
|
|
|
|
# `SinglePassRange` is a model of the __single_pass_range__ Concept.
|
|
|
|
# `Container` supports insert at a specified position.
|
|
|
|
# `SinglePassRange`'s value type is convertible to `Container`'s value type.
|
|
|
|
|
|
|
|
[heading Complexity]
|
|
|
|
|
|
|
|
Linear. `distance(from)` assignments are performed.
|
|
|
|
|
|
|
|
[endsect]
|