Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

remove_copy_if
PrevUpHomeNext
Prototype

template<class ForwardRange, class Outputiterator, class UnaryPred>
OutputIterator
remove_copy_if(ForwardRange& rng, OutputIterator out, UnaryPred pred);

template<class ForwardRange, class OutputIterator, class UnaryPred>
OutputIterator
remove_copy_if(const ForwardRange& rng, OutputIterator out, UnaryPred pred);

Description

remove_copy_if copied all of the elements x from rng for which pred(x) is false.

Definition

Defined in the header file boost/range/algorithm/remove_copy_if.hpp

Requirements
  • ForwardRange is a model of the Forward Range Concept.
  • ForwardRange is mutable.
  • UnaryPred is a model of the UnaryPredicateConcept.
Complexity

Linear. remove_copy_if performs exactly distance(rng) comparisons with UnaryPred.


PrevUpHomeNext