cpp/algorithm/ranges/replace copy

Copies the elements from the source range to the destination range beginning at, replacing all elements satisfying specific criteria with. The behavior is undefined if the source and destination ranges overlap.

@1@ Replaces all elements that are equal to, using to compare.

@3@ Replaces all elements for which the predicate evaluates to, where the evaluating expression is.

@2,4@ Same as, but uses as the source range, as if using  as , and  as.

Return value
, where @1,3@ ; @2,4@.

Complexity
Exactly applications of the corresponding predicate  and any projection.