template <class InputIterator, class OutputIterator, class Predicate, class T>
OutputIterator replace_copy_if(InputIterator first, InputIterator last,
OutputIterator result, Predicate pred,
const T& new_value)
Description
Replace_copy_if copies elements from the range [first, last) to
the range [result, result + (last-first)), except that any element
for which pred is true is not copied; new_value is copied instead.
More precisely, for every integer n such that 0 <= n < last-first,
replace_copy_if performs the assignment *(result+n) = new_value
if pred(*(first+n)), and *(result+n) = *(first+n)
otherwise.