remove_erase_if.qbk 865 B

12345678910111213141516171819202122232425262728293031323334
  1. [/
  2. Copyright 2010 Neil Groves
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. /]
  6. [section:remove_erase_if remove_erase_if]
  7. [heading Prototype]
  8. ``
  9. template<class Container, class Pred>
  10. Container& remove_erase_if(Container& target,
  11. Pred pred);
  12. ``
  13. [heading Description]
  14. `remove_erase_if` removes the elements `x` that satisfy `pred(x)` from the container.
  15. This is in contrast to the `erase` algorithm which merely rearranges elements.
  16. [heading Definition]
  17. Defined in the header file `boost/range/algorithm_ext/erase.hpp`
  18. [heading Requirements]
  19. # `Container` supports erase of an iterator range.
  20. # `Pred` is a model of the `Predicate` Concept.
  21. [heading Complexity]
  22. Linear. Proportional to `distance(target)`s.
  23. [endsect]