Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/algorithm/ranges/partition copy"

From cppreference.com
< cpp‎ | algorithm‎ | ranges
m (UB, Return value)
(Lining up parameters.)
Line 5: Line 5:
 
{{dcl h | Call signature}}
 
{{dcl h | Call signature}}
 
{{dcl | since=c++20 | num=1 |1=
 
{{dcl | since=c++20 | num=1 |1=
template< std::input_iterator I, std::sentinel_for<I> S,
+
template< std::input_iterator I,
           std::weakly_incrementable O1, std::weakly_incrementable O2,
+
std::sentinel_for<I> S,
           class Proj = std::identity, std::indirect_unary_predicate<
+
           std::weakly_incrementable O1,
          std::projected<I, Proj>> Pred >
+
std::weakly_incrementable O2,
requires std::indirectly_copyable<I, O1> && std::indirectly_copyable<I, O2>
+
           class Proj = std::identity,
 +
std::indirect_unary_predicate<std::projected<I, Proj>> Pred >
 +
requires std::indirectly_copyable<I, O1>
 +
&& std::indirectly_copyable<I, O2>
 
constexpr partition_copy_result<I, O1, O2>
 
constexpr partition_copy_result<I, O1, O2>
          partition_copy( I first, S last, O1 out_true, O2 out_false, Pred pred, Proj proj = {} );
+
partition_copy( I first,
 +
S last,
 +
O1 out_true,
 +
O2 out_false,
 +
Pred pred,
 +
Proj proj = {} );
 
}}
 
}}
 
{{dcl | since=c++20 | num=2 |1=
 
{{dcl | since=c++20 | num=2 |1=
template< ranges::input_range R, std::weakly_incrementable O1, std::weakly_incrementable O2,
+
template< ranges::input_range R,
 +
std::weakly_incrementable O1,
 +
std::weakly_incrementable O2,
 
           class Proj = std::identity,
 
           class Proj = std::identity,
 
           std::indirect_unary_predicate<std::projected<iterator_t<R>, Proj>> Pred >
 
           std::indirect_unary_predicate<std::projected<iterator_t<R>, Proj>> Pred >
requires std::indirectly_copyable<ranges::iterator_t<R>, O1> &&
+
requires std::indirectly_copyable<ranges::iterator_t<R>, O1>
          std::indirectly_copyable<ranges::iterator_t<R>, O2>
+
&& std::indirectly_copyable<ranges::iterator_t<R>, O2>
 
constexpr partition_copy_result<ranges::borrowed_iterator_t<R>, O1, O2>
 
constexpr partition_copy_result<ranges::borrowed_iterator_t<R>, O1, O2>
          partition_copy( R&& r, O1 out_true, O2 out_false, Pred pred, Proj proj = {} );
+
partition_copy( R&& r,
 +
O1 out_true,
 +
O2 out_false,
 +
Pred pred,
 +
Proj proj = {} );
 
}}
 
}}
 
{{dcl h | Helper types}}
 
{{dcl h | Helper types}}

Revision as of 09:50, 22 September 2021