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

remove_copy()

Library:  Algorithms


Function

Local Index

No Entries

Summary

Algorithm that copies all elements other than those that compare equal to a given value from one range to another

Synopsis

#include <algorithm>

namespace std {
  template <class InputIterator,
            class OutputIterator,
            class T>
  OutputIterator remove_copy(InputIterator start,
                             InputIterator finish,
                             OutputIterator result,
                             const T& value);
}

Description

The remove_copy() algorithm copies all the elements referred to by the iterator i in the range [start, finish) for which the following corresponding condition does not hold: *i == value. remove_copy() returns an iterator that points to the end of the destination range. remove_copy() 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. The elements in the original sequence are not altered by remove_copy().

Complexity

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

Example

See Also

remove(), remove_if(), remove_copy_if()

Standards Conformance

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



Previous fileTop of DocumentContentsIndex pageNext file