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{})
64 *o0 = (decltype(x) &&)x;
69 *o1 = (decltype(x) &&)x;
73 return {
first, o0, o1};
77 template(
typename Rng,
82 requires input_range<Rng> AND weakly_incrementable<O0> AND
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>
template(typename Rng, typename O0, typename O1, typename C, typename P=identity)(requires input_range< Rng > AND weakly_incrementable< O0 > AND weakly_incrementable< O1 > AND indirectly_copyable< iterator_t< Rng >
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_copyable
\concept indirectly_copyable
Definition: concepts.hpp:782
CPP_concept weakly_incrementable
\concept weakly_incrementable
Definition: concepts.hpp:268
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