Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Standard C++ Library Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

remove_copy_if()

Module:  Standard C++ Library   Library:  Algorithms


Function

Local Index

No Entries

Summary

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

Synopsis

#include <algorithm>

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

Description

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.

Complexity

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

Example

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

Copyright (c) 1994-2006 Rogue Wave Software, a Quovadx Division.
Licensed under the Apache License, Version 2.0.
Contact Rogue Wave about documentation or support issues. You can also seek help from other developers through the Apache stdcxx community (see below).

For more information on the Rogue Wave Standard C++ Library under open source, see Section 1.2 of the user's guide.