remove_copy_if function template — Copies elements for which a predicate returns false
template<typename InIter, typename OutIter, typename Predicate>
OutIter remove_copy_if(InIter first, InIter last, OutIter result,
Predicate pred);
The remove_copy_if
function
template copies items from the range [first
, last
) to the range that starts at result
. Only items for which pred
returns false are copied.
The return value is one past the end of the result range. The relative order of items that are not removed is stable.
The source and result ranges must not overlap. See Figure 13-13 (under remove_copy
) for an example of the removal
process.