Container-based version of the <algorithm> std::replace_copy() function to replace a container's elements of some value with a new value and return the results within an iterator.
Declared in <absl/algorithm/container.h>
template<
typename C,
typename OutputIterator,
typename T>
constexpr
OutputIterator
c_replace_copy(
C const& c,
OutputIterator result,
T&& old_value,
T&& new_value);
An iterator to the end of the copied range in the output.
| Name | Description |
|---|---|
| c | The container whose elements to copy. |
| result | The output iterator receiving the copied elements. |
| old_value | The value to be replaced. |
| new_value | The value to substitute for old_value. |