Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
replace_copy_if
template<class InIt, class OutIt, class Pred, class T>
    OutIt replace_copy_if(InIt first, InIt last, OutIt x,
        Pred pr, const T& val);
The template function executes the statement:
if (pr(*(first + N)))
    *(x + N) = val;
else
    *(x + N) = *(first + N)
once for each N in the range [0, last - first).
If x and first designate regions of storage, the range [x, x + (last - first)) must not overlap the range [first, last).
See the related sample program.