13#ifndef RANGES_V3_ALGORITHM_COPY_IF_HPP
14#define RANGES_V3_ALGORITHM_COPY_IF_HPP
21#include <range/v3/algorithm/result_types.hpp>
30#include <range/v3/utility/static_const.hpp>
32#include <range/v3/detail/prologue.hpp>
38 template<
typename I,
typename O>
39 using copy_if_result = detail::in_out_result<I, O>;
41 RANGES_FUNC_BEGIN(copy_if)
49 constexpr copy_if_result<I, O>
50 RANGES_FUNC(copy_if)(I
first, S last, O out, F pred, P proj = P{})
57 *out = (
decltype(x) &&)x;
65 template(
typename Rng,
typename O,
typename F,
typename P =
identity)(
69 constexpr copy_if_result<borrowed_iterator_t<Rng>, O>
70 RANGES_FUNC(copy_if)(Rng && rng, O out, F pred, P proj = P{})
73 begin(rng), end(rng), std::move(out), std::move(pred), std::move(proj));
76 RANGES_FUNC_END(copy_if)
80 using ranges::copy_if;
81 using ranges::copy_if_result;
86#include <range/v3/detail/epilogue.hpp>
The indirect_unary_predicate concept.
The indirectly_copyable concept.
The sentinel_for concept.
The weakly_incrementable concept.
template(typename Rng, typename O, typename F, typename P=identity)(AND weakly_incrementable< O > AND indirect_unary_predicate< F
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: identity.hpp:25