Container‐based version of the <algorithm> std::replace() function to replace a container's elements of some value with a new value. The container is modified in place.
Synopsis
Declared in <absl/algorithm/container.h>
template<
typename Sequence,
typename T>
constexpr
void
c_replace(
Sequence& sequence,
T const& old_value,
T const& new_value);
Parameters
Name |
Description |
sequence |
The container to modify. |
old_value |
The value to be replaced. |
new_value |
The value to substitute for |
Created with MrDocs