mirror of
https://github.com/boostorg/range.git
synced 2025-07-29 20:37:25 +02:00
Boost.Range updated the return types of various algorithms to improve consistency. This is to address a specific request made during the formal review of Boost.RangeEx.
[SVN r61211]
This commit is contained in:
@ -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`
|
||||
|
Reference in New Issue
Block a user