Files
boost_range/doc/reference/algorithm_ext/erase.qbk
Neil Groves a47f15a98f 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]
2010-04-23 22:50:56 +00:00

33 lines
819 B
Plaintext

[section:erase erase]
[heading Prototype]
``
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`
[heading Requirements]
# `Container` supports erase of an iterator range.
[heading Complexity]
Linear. Proprotional to `distance(to_erase)`.
[endsect]