Boost.Range merge from trunk to release.

This is motivated by the need to correct the istream_range, to correct the adaptors.hpp header file, and correct the return types of various range algorithms.

[SVN r61517]
This commit is contained in:
Neil Groves
2010-04-23 22:50:56 +00:00
parent dfc30e334d
commit a47f15a98f
223 changed files with 2754 additions and 2666 deletions

View File

@ -3,18 +3,20 @@
[heading Prototype]
``
template<
class Container,
class SinglePassRange
>
void erase(Container& target,
iterator_range<typename Container::iterator> to_erase);
template<class Container>
Container& erase(
Container& target,
iterator_range<typename Container::iterator> to_erase);
``
[heading Description]
`erase` the iterator range `to_erase` from the container `target`.
`remove_erase` performs the frequently used combination equivalent to `target.erase(std::remove(target.begin(), target.end(), value), target.end());`
`remove_erase_if` performs the frequently used combination equivalent to `target.erase(std::remove_if(target.begin(), target.end(), pred), target.end());`
[heading Definition]
Defined in the header file `boost/range/algorithm_ext/erase.hpp`

View File

@ -7,9 +7,9 @@ template<
class Container,
class SinglePassRange
>
void insert(Container& target,
typename Container::iterator before,
const SinglePassRange& from);
Container& insert(Container& target,
typename Container::iterator before,
const SinglePassRange& from);
``
[heading Description]

View File

@ -3,8 +3,8 @@
[heading Prototype]
``
template<class SinglePassRange, class Value>
iota(SinglePassRange& rng, Value x);
template<class ForwardRange, class Value>
ForwardRange& iota(ForwardRange& rng, Value x);
``
[heading Description]
@ -18,7 +18,7 @@ Defined in the header file `boost/range/algorithm_ext/iota.hpp`
[heading Requirements]
# `SinglePassRange` is a model of the __single_pass_range__ Concept.
# `ForwardRange` is a model of the __forward_range__ Concept.
# `Value` is a model of the `Incrementable` Concept.
[heading Complexity]

View File

@ -7,8 +7,8 @@ template<
class Container,
class SinglePassRange
>
void push_back(Container& target,
const SinglePassRange& from);
Container& push_back(Container& target,
const SinglePassRange& from);
``
[heading Description]

View File

@ -7,8 +7,8 @@ template<
class Container,
class SinglePassRange
>
void push_front(Container& target,
const SinglePassRange& from);
Container& push_front(Container& target,
const SinglePassRange& from);
``
[heading Description]

View File

@ -3,17 +3,14 @@
[heading Prototype]
``
template<
class Container,
class T
>
void remove_erase(Container& target,
const T& val);
template<class Container, class Value>
Container& remove_erase(Container& target,
const Value& value);
``
[heading Description]
`remove_erase` actually eliminates the elements equal to `val` from the container. This
`remove_erase` actually eliminates the elements equal to `value` from the container. This
is in contrast to the `remove` algorithm which merely rearranges elements.
[heading Definition]

View File

@ -3,12 +3,9 @@
[heading Prototype]
``
template<
class Container,
class Pred
>
void remove_erase(Container& target,
Pred pred);
template<class Container, class Pred>
Container& remove_erase_if(Container& target,
Pred pred);
``
[heading Description]