llvm::replace_copy

Copy Range to Out, replacing OldValue with NewValue.

Synopsis

Declared in <llvm/ADT/STLExtras.h>

template<
    typename R,
    typename OutputIt,
    typename T>
OutputIt
replace_copy(
    R&& Range,
    OutputIt Out,
    T const& OldValue,
    T const& NewValue);

Return Value

Output iterator past the last written element.

Parameters

NameDescription
RangeRange to copy from.
OutOutput iterator receiving the results.
OldValueValue to replace.
NewValueReplacement value.