Range-v3
Range algorithms, views, and actions for the Standard Library
replace.hpp File Reference

Functions

template<typename I , typename S , typename T1 , typename T2 , typename P = identity>
requires input_iterator<I> && sentinel_for<S, I> && indirectly_writable<I, T2 const &> && indirect_relation<equal_to, projected<I, P>, T1 const *>
constexpr I ranges::replace (I first, S last, T1 const &old_value, T2 const &new_value, P proj={})
 function template replace
 
template<typename Rng , typename T1 , typename T2 , typename P = identity>
requires input_range<Rng> && indirectly_writable<iterator_t<Rng>, T2 const &> && indirect_relation<equal_to, projected<iterator_t<Rng>, P>, T1 const *>
constexpr borrowed_iterator_t< Rng > ranges::replace (Rng &&rng, T1 const &old_value, T2 const &new_value, P proj={})
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.