13 #ifndef RANGES_V3_ALGORITHM_REPLACE_COPY_IF_HPP
14 #define RANGES_V3_ALGORITHM_REPLACE_COPY_IF_HPP
20 #include <range/v3/algorithm/result_types.hpp>
29 #include <range/v3/utility/static_const.hpp>
31 #include <range/v3/detail/prologue.hpp>
37 template<
typename I,
typename O>
38 using replace_copy_if_result = detail::in_out_result<I, O>;
40 RANGES_FUNC_BEGIN(replace_copy_if)
53 constexpr replace_copy_if_result<I, O> RANGES_FUNC(replace_copy_if)(
54 I
first, S last, O out, C pred, T const & new_value, P proj = {})
62 *out = (decltype(x) &&)x;
68 template(
typename Rng,
typename O,
typename C,
typename T,
typename P =
identity)(
69 requires input_range<Rng> AND output_iterator<O, T const &> AND
72 constexpr replace_copy_if_result<borrowed_iterator_t<Rng>, O> RANGES_FUNC(replace_copy_if)(
73 Rng && rng, O out, C pred, T
const & new_value, P proj = {})
75 return (*
this)(begin(rng),
83 RANGES_FUNC_END(replace_copy_if)
87 using ranges::replace_copy_if;
88 using ranges::replace_copy_if_result;
93 #include <range/v3/detail/epilogue.hpp>
template(typename Rng, typename O, typename C, typename T, typename P=identity)(requires input_range< Rng > AND output_iterator< O
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 output_iterator
\concept output_iterator
Definition: concepts.hpp:347
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_copyable
\concept indirectly_copyable
Definition: concepts.hpp:782
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