13 #ifndef RANGES_V3_ALGORITHM_REPLACE_IF_HPP
14 #define RANGES_V3_ALGORITHM_REPLACE_IF_HPP
28 #include <range/v3/utility/static_const.hpp>
30 #include <range/v3/detail/prologue.hpp>
36 RANGES_FUNC_BEGIN(replace_if)
43 constexpr I RANGES_FUNC(replace_if)(
44 I
first, S last, C pred, T const & new_value, P proj = P{})
53 template(
typename Rng,
typename C,
typename T,
typename P =
identity)(
54 requires input_range<Rng> AND
57 constexpr borrowed_iterator_t<Rng> RANGES_FUNC(replace_if)(
58 Rng && rng, C pred, T
const & new_value, P proj = P{})
61 begin(rng), end(rng), std::move(pred), new_value, std::move(proj));
64 RANGES_FUNC_END(replace_if)
68 using ranges::replace_if;
73 #include <range/v3/detail/epilogue.hpp>
template(typename Rng, typename C, typename T, typename P=identity)(requires input_range< Rng > AND indirect_unary_predicate< C
This is an overloaded member function, provided for convenience. It differs from the above function o...
CPP_concept sentinel_for
\concept sentinel_for
Definition: concepts.hpp:306
CPP_concept indirect_unary_predicate
\concept indirect_unary_predicate
Definition: concepts.hpp:632
CPP_concept input_iterator
\concept input_iterator
Definition: concepts.hpp:362
CPP_concept indirectly_writable
\concept indirectly_writable
Definition: concepts.hpp:169
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: identity.hpp:25