Standard C++ Library Reference ISO/IEC (VERSION3)
once for each N in the range [0, last - first). Here, operator== must perform a
pairwise comparison between its operands. It then returns X. Thus, the function removes from
the resulting sequence all elements for which the predicate *(first + N) == val is true,
without altering the relative order of remaining elements, and returns the iterator value that
designates the end of the resulting sequence.
remove_copy
template<class InIt, class OutIt, class Ty>
OutIt remove_copy(InIt first, InIt last, OutIt dest,
const Ty& val);
The template function effectively executes the statement:
if (!(*(first + N) == val))
*dest++ = *(first + N);
once for each N in the range [0, last - first). Here, operator== must perform a
pairwise comparison between its operands. It then returns dest. Thus, the function removes
from the resulting sequence all elements for which the predicate *(first + N) == val is
true, without altering the relative order of remaining elements, and returns the iterator value that
designates the end of the resulting sequence.
If dest and first designate regions of storage, the range [dest, dest + (last -
first)) must not overlap the range [first, last).
remove_copy_if
template<class InIt, class OutIt, class Pr>
OutIt remove_copy_if(InIt first, InIt last, OutIt dest,
Pr pred);
The template function effectively executes the statement:
if (!pred(*(first + N)))
*dest++ = *(first + N);
once for each N in the range [0, last - first). It then returns dest. Thus, the function
removes from the resulting sequence all elements for which the predicate pred(*(first +
N)) is true, without altering the relative order of remaining elements, and returns the iterator
value that designates the end of the resulting sequence.
If dest and first designate regions of storage, the range [dest, dest + (last -
first)) must not overlap the range [first, last).