Next : Unique, Previous : Generate, Top : Table of Contents
ForwardIterator remove (ForwardIterator first, ForwardIterator last, const T& value) | Function |
ForwardIterator remove_if (ForwardIterator first, ForwardIterator last, Predicate pred) | Function |
templateForwardIterator remove(ForwardIterator first, ForwardIterator last, const T& value); template ForwardIterator remove_if(ForwardIterator first, ForwardIterator last, Predicate pred);
remove eliminates all the elements referred to by iterator i in the range [first, last) for which the following corresponding conditions hold: *i == value, pred(*i) == true. remove returns the end of the resulting range. remove is stable, that is, the relative order of the elements that are not removed is the same as their relative order in the original range. Exactly last - first applications of the corresponding predicate are done.
templateOutputIterator remove_copy(InputIterator first, InputIterator last, OutputIterator result, const T& value); template OutputIterator remove_copy_if(InputIterator first, InputIterator last, OutputIterator result, Predicate pred);
remove_copy copies all the elements referred to by the iterator i in the range [first, last) for which the following corresponding conditions do not hold: *i == value, pred(*i) == true. remove_copy returns the end of the resulting range. remove_copy is stable, that is, the relative order of the elements in the resulting range is the same as their relative order in the original range. Exactly last - first applications of the corresponding predicate are done.
|
|