13#ifndef RANGES_V3_ALGORITHM_REPLACE_HPP
14#define RANGES_V3_ALGORITHM_REPLACE_HPP
28#include <range/v3/utility/static_const.hpp>
30#include <range/v3/detail/prologue.hpp>
36 RANGES_FUNC_BEGIN(replace)
43 constexpr I RANGES_FUNC(replace)(
44 I
first, S last, T1 const & old_value, T2 const & new_value, P proj = {})
53 template(
typename Rng,
typename T1,
typename T2,
typename P =
identity)(
57 constexpr borrowed_iterator_t<Rng> RANGES_FUNC(replace)(
58 Rng && rng, T1
const & old_value, T2
const & new_value, P proj = {})
60 return (*
this)(begin(rng), end(rng), old_value, new_value, std::move(proj));
63 RANGES_FUNC_END(replace)
67 using ranges::replace;
72#include <range/v3/detail/epilogue.hpp>
The indirect_relation concept.
The indirectly_writable concept.
The sentinel_for concept.
template(typename Rng, typename T1, typename T2, typename P=identity)(AND indirectly_writable< iterator_t< Rng >
This is an overloaded member function, provided for convenience. It differs from the above function o...
decltype(begin(declval(Rng &))) iterator_t
Definition: access.hpp:698
typename Fn::template invoke< Args... > invoke
Evaluate the invocable Fn with the arguments Args.
Definition: meta.hpp:541
front< Pair > first
Retrieve the first element of the pair Pair.
Definition: meta.hpp:2251
Definition: comparisons.hpp:28
Definition: identity.hpp:25