[#absl-c_replace_copy] = xref:absl.adoc[absl]::c_replace_copy :relfileprefix: ../ :mrdocs: 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. == Synopsis Declared in `<absl/algorithm/container.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename C, typename OutputIterator, typename T> constexpr OutputIterator c_replace_copy( C const& c, OutputIterator result, T&& old_value, T&& new_value); ---- == Return Value An iterator to the end of the copied range in the output. == Parameters [cols="1,4"] |=== | 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`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#