13#ifndef RANGES_V3_ALGORITHM_PARTITION_COPY_HPP
14#define RANGES_V3_ALGORITHM_PARTITION_COPY_HPP
22#include <range/v3/algorithm/result_types.hpp>
32#include <range/v3/utility/static_const.hpp>
34#include <range/v3/detail/prologue.hpp>
40 template<
typename I,
typename O0,
typename O1>
41 using partition_copy_result = detail::in_out1_out2_result<I, O0, O1>;
43 RANGES_FUNC_BEGIN(partition_copy)
56 constexpr partition_copy_result<I, O0, O1> RANGES_FUNC(partition_copy)(
57 I first, S last, O0 o0, O1 o1, C pred, P proj = P{})
59 for(; first != last; ++first)
62 if(invoke(pred, invoke(proj, x)))
64 *o0 = (
decltype(x) &&)x;
69 *o1 = (
decltype(x) &&)x;
73 return {
first, o0, o1};
77 template(
typename Rng,
86 constexpr partition_copy_result<borrowed_iterator_t<Rng>, O0, O1>
87 RANGES_FUNC(partition_copy)(Rng && rng, O0 o0, O1 o1, C pred, P proj = P{})
89 return (*
this)(begin(rng),
97 RANGES_FUNC_END(partition_copy)
101 using ranges::partition_copy;
102 using ranges::partition_copy_result;
107#include <range/v3/detail/epilogue.hpp>
The indirect_unary_predicate concept.
The indirectly_copyable concept.
The sentinel_for concept.
The weakly_incrementable concept.
decltype(begin(declval(Rng &))) iterator_t
Definition access.hpp:698
front< Pair > first
Retrieve the first element of the pair Pair.
Definition meta.hpp:2251
Definition identity.hpp:25