Previous fileTop of DocumentContentsIndex pageNext file
Apache C++ Standard Library Reference Guide


Library:  Algorithms


Local Index

No Entries


Algorithm that copies all elements other than those that satisfy a given predicate from one range to another


#include <algorithm>

namespace std {
  template <class InputIterator,
            class OutputIterator,
            class Predicate>
  OutputIterator remove_copy_if(InputIterator start,
                                InputIterator finish,
                                OutputIterator result,
                                Predicate pred);


The remove_copy_if() algorithm copies all the elements referred to by the iterator i in the range [start, finish) for which the following condition does not hold: pred(*i) == true. remove_copy_if() returns an iterator that points to the end of the resulting range. remove_copy_if() is stable, which means that the relative order of the elements in the resulting range is the same as their relative order in the original range.


Exactly finish - start applications of the corresponding predicate are done.


See Also

remove(), remove_if(), remove_copy()

Standards Conformance

ISO/IEC 14882:1998 -- International Standard for Information Systems -- Programming Language C++, Section 25.2.7

Previous fileTop of DocumentContentsIndex pageNext file