Range-v3
Range algorithms, views, and actions for the Standard Library
Algorithms

Iterator- and range-based algorithms, like the standard algorithms. More...

Typedefs

template<typename I1 , typename I2 , typename O >
using ranges::binary_transform_result = detail::in1_in2_out_result< I1, I2, O >
 
template<typename I , typename O >
using ranges::copy_backward_result = detail::in_out_result< I, O >
 
template<typename I , typename O >
using ranges::copy_if_result = detail::in_out_result< I, O >
 
template<typename I , typename O >
using ranges::copy_n_result = detail::in_out_result< I, O >
 
template<typename I , typename O >
using ranges::copy_result = detail::in_out_result< I, O >
 
template<typename I , typename F >
using ranges::for_each_result = detail::in_fun_result< I, F >
 
template<typename O , typename F >
using ranges::generate_n_result = detail::out_fun_result< O, F >
 
template<typename O , typename F >
using ranges::generate_result = detail::out_fun_result< O, F >
 
template<typename I0 , typename I1 , typename O >
using ranges::merge_result = detail::in1_in2_out_result< I0, I1, O >
 
template<typename I >
using ranges::minmax_element_result = detail::min_max_result< I, I >
 
template<typename T >
using ranges::minmax_result = detail::min_max_result< T, T >
 
template<typename I1 , typename I2 >
using ranges::mismatch_result = detail::in1_in2_result< I1, I2 >
 
template<typename I , typename O >
using ranges::move_backward_result = detail::in_out_result< I, O >
 
template<typename I , typename O >
using ranges::move_result = detail::in_out_result< I, O >
 
template<typename I , typename O0 , typename O1 >
using ranges::partition_copy_result = detail::in_out1_out2_result< I, O0, O1 >
 
template<typename I , typename O >
using ranges::remove_copy_if_result = detail::in_out_result< I, O >
 
template<typename I , typename O >
using ranges::remove_copy_result = detail::in_out_result< I, O >
 
template<typename I , typename O >
using ranges::replace_copy_if_result = detail::in_out_result< I, O >
 
template<typename I , typename O >
using ranges::replace_copy_result = detail::in_out_result< I, O >
 
template<typename I , typename O >
using ranges::reverse_copy_result = detail::in_out_result< I, O >
 
template<typename I , typename O >
using ranges::rotate_copy_result = detail::in_out_result< I, O >
 
template<typename I , typename O >
using ranges::sample_result = detail::in_out_result< I, O >
 
using ranges::set_difference_result = detail::in1_out_result< I, O >
 
template<typename I1 , typename I2 , typename O >
using ranges::set_symmetric_difference_result = detail::in1_in2_out_result< I1, I2, O >
 
using ranges::set_union_result = detail::in1_in2_out_result< I1, I2, O >
 
template<typename I1 , typename I2 >
using ranges::swap_ranges_result = detail::in1_in2_result< I1, I2 >
 
template<typename I , typename O >
using ranges::unary_transform_result = detail::in_out_result< I, O >
 
template<typename I , typename O >
using ranges::unique_copy_result = detail::in_out_result< I, O >
 

Functions

template<typename I , typename C , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires bidirectional_iterator< I > &&permutable< I > &&indirect_unary_predicate< C, projected< I, P >>) ccconstexpr I unstable_remove_if(I first
 unstable_remove have O(1) complexity for each element remove, unlike remove O(n) [for worst case]. Each erased element overwritten (moved in) with last one. unstable_remove_if does not preserve relative element order. More...
 
template<typename I , typename S , typename O >
CPP_TEMPLATE_AUX_0 ranges::c (requires bidirectional_iterator< I > &&sentinel_for< S, I > &&bidirectional_iterator< O > &&indirectly_copyable< I, O >) ccconstexpr copy_backward_result< I
 function template copy_backward
 
template<typename I , typename S , typename O >
CPP_TEMPLATE_AUX_0 ranges::c (requires bidirectional_iterator< I > &&sentinel_for< S, I > &&bidirectional_iterator< O > &&indirectly_movable< I, O >) ccconstexpr move_backward_result< I
 function template move_backward
 
template<typename I , typename S >
CPP_TEMPLATE_AUX_0 ranges::c (requires bidirectional_iterator< I > &&sentinel_for< S, I > &&permutable< I >) ccconstexpr I reverse(I first
 function template reverse
 
template<typename I , typename S , typename O >
CPP_TEMPLATE_AUX_0 ranges::c (requires bidirectional_iterator< I > &&sentinel_for< S, I > &&weakly_incrementable< O > &&indirectly_copyable< I, O >) ccconstexpr reverse_copy_result< I
 function template reverse_copy
 
template<typename Rng , typename O >
CPP_TEMPLATE_AUX_0 ranges::c (requires bidirectional_range< Rng > &&bidirectional_iterator< O > &&indirectly_copyable< iterator_t< Rng >, O >) cccopy_backward_result< borrowed_iterator_t< Rng >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng , typename O >
CPP_TEMPLATE_AUX_0 ranges::c (requires bidirectional_range< Rng > &&bidirectional_iterator< O > &&indirectly_movable< iterator_t< Rng >, O >) ccconstexpr move_backward_result< borrowed_iterator_t< Rng >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng , typename I = iterator_t<Rng>>
CPP_TEMPLATE_AUX_0 ranges::c (requires bidirectional_range< Rng > &&permutable< I >) ccconstexpr borrowed_iterator_t< Rng > reverse(Rng &&rng)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng , typename O >
CPP_TEMPLATE_AUX_0 ranges::c (requires bidirectional_range< Rng > &&weakly_incrementable< O > &&indirectly_copyable< iterator_t< Rng >, O >) ccconstexpr reverse_copy_result< borrowed_iterator_t< Rng >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename I , typename S , typename C = equal_to, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires forward_iterator< I > &&sentinel_for< S, I > &&indirect_relation< C, projected< I, P >>) ccconstexpr I adjacent_find(I first
 function template adjacent_find More...
 
template<typename I , typename S , typename C = less, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires forward_iterator< I > &&sentinel_for< S, I > &&indirect_strict_weak_order< C, projected< I, P >>) ccconstexpr I max_element(I first
 function template max_element More...
 
template<typename I , typename S , typename V , typename C = less, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires forward_iterator< I > &&sentinel_for< S, I > &&indirect_strict_weak_order< C, V const *, projected< I, P >>) ccconstexpr bool binary_search(I first
 function template binary_search More...
 
template<typename I , typename S , typename R = less, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires forward_iterator< I > &&sentinel_for< S, I > &&indirect_strict_weak_order< R, projected< I, P >>) ccconstexpr bool is_sorted(I first
 template function is_sorted More...
 
template<typename I , typename S , typename C , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires forward_iterator< I > &&sentinel_for< S, I > &&indirect_unary_predicate< C, projected< I, P >>) ccconstexpr I partition_point(I first
 function template partition_point
 
template<typename I , typename S , typename V , typename C = equal_to, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires forward_iterator< I > &&sentinel_for< S, I > &&indirectly_comparable< I, V const *, C, P >) ccconstexpr subrange< I > search_n(I first
 function template search_n
 
template<typename I , typename S , typename O , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires forward_iterator< I > &&sentinel_for< S, I > &&weakly_incrementable< O > &&indirectly_copyable< I, O >) ccconstexpr rotate_copy_result< I
 function template rotate_copy
 
template<typename I1 , typename S1 , typename I2 , typename S2 , typename R = equal_to, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires forward_iterator< I1 > &&sentinel_for< S1, I1 > &&forward_iterator< I2 > &&sentinel_for< S2, I2 > &&indirect_relation< R, projected< I1, P >, I2 >) ccconstexpr subrange< I1 > find_end(I1 begin1
 function template find_end
 
template<typename I1 , typename S1 , typename I2 , typename S2 , typename C = equal_to, typename P1 = identity, typename P2 = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires forward_iterator< I1 > &&sentinel_for< S1, I1 > &&forward_iterator< I2 > &&sentinel_for< S2, I2 > &&indirectly_comparable< I1, I2, C, P1, P2 >) ccconstexpr subrange< I1 > search(I1 begin1
 function template search
 
template<typename T , typename C = less, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires indirect_strict_weak_order< C, projected< T const *, P >>) ccconstexpr T const &max(T const &a
 function template max More...
 
template<typename I , typename F , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&indirectly_unary_invocable< F, projected< I, P >>) ccconstexpr I for_each_n(I first
 function template for_each_n
 
template<typename I , typename S , typename T , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&sentinel_for< S, I > &&indirect_relation< equal_to, projected< I, P >, const T * >) ccconstexpr bool contains(I first
 function template contains
 
template<typename I , typename S , typename V , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&sentinel_for< S, I > &&indirect_relation< equal_to, projected< I, P >, V const * >) ccconstexpr iter_difference_t< I > count(I first
 function template count More...
 
template<typename I , typename S , typename C , typename T , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&sentinel_for< S, I > &&indirect_unary_predicate< C, projected< I, P >> &&indirectly_writable< I, T const & >) ccconstexpr I replace_if(I first
 function template replace_if
 
template<typename I , typename S , typename C , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&sentinel_for< S, I > &&indirect_unary_predicate< C, projected< I, P >>) ccconstexpr bool is_partitioned(I first
 function template is_partitioned
 
template<typename I , typename S , typename F , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&sentinel_for< S, I > &&indirect_unary_predicate< F, projected< I, P >>) ccconstexpr bool all_of(I first
 function template all_of More...
 
template<typename I , typename S , typename R , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&sentinel_for< S, I > &&indirect_unary_predicate< R, projected< I, P >>) ccconstexpr iter_difference_t< I > count_if(I first
 function template count_if
 
template<typename I , typename S , typename F , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&sentinel_for< S, I > &&indirectly_unary_invocable< F, projected< I, P >>) ccconstexpr for_each_result< I
 function template for_each
 
template<typename I , typename S , typename T1 , typename T2 , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&sentinel_for< S, I > &&indirectly_writable< I, T2 const & > &&indirect_relation< equal_to, projected< I, P >, T1 const * >) ccconstexpr I replace(I first
 function template replace
 
template<typename I , typename S , typename O , typename C , typename T , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&sentinel_for< S, I > &&output_iterator< O, T const & > &&indirect_unary_predicate< C, projected< I, P >> &&indirectly_copyable< I, O >) ccconstexpr replace_copy_if_result< I
 function template replace_copy_if
 
template<typename I , typename S , typename O , typename T1 , typename T2 , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&sentinel_for< S, I > &&output_iterator< O, T2 const & > &&indirectly_copyable< I, O > &&indirect_relation< equal_to, projected< I, P >, T1 const * >) ccconstexpr replace_copy_result< I
 function template replace_copy
 
template<typename I , typename S , typename O , typename F , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&sentinel_for< S, I > &&weakly_incrementable< O > &&copy_constructible< F > &&indirectly_writable< O, indirect_result_t< F &, projected< I, P >>>) ccconstexpr unary_transform_result< I
 function template transform
 
template<typename I , typename S , typename O , typename T , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&sentinel_for< S, I > &&weakly_incrementable< O > &&indirect_relation< equal_to, projected< I, P >, T const * > &&indirectly_copyable< I, O >) ccconstexpr remove_copy_result< I
 function template remove_copy
 
template<typename I , typename S , typename O , typename C , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&sentinel_for< S, I > &&weakly_incrementable< O > &&indirect_unary_predicate< C, projected< I, P >> &&indirectly_copyable< I, O >) ccconstexpr remove_copy_if_result< I
 function template remove_copy_if
 
template<typename I , typename S , typename O , typename F , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&sentinel_for< S, I > &&weakly_incrementable< O > &&indirect_unary_predicate< F, projected< I, P >> &&indirectly_copyable< I, O >) ccconstexpr copy_if_result< I
 function template copy_if
 
template<typename I , typename S , typename O >
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&sentinel_for< S, I > &&weakly_incrementable< O > &&indirectly_copyable< I, O >) ccconstexpr copy_result< I
 function template copy
 
template<typename I , typename S , typename O >
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&sentinel_for< S, I > &&weakly_incrementable< O > &&indirectly_movable< I, O >) ccconstexpr move_result< I
 function template move
 
template<typename I , typename S , typename O0 , typename O1 , typename C , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&sentinel_for< S, I > &&weakly_incrementable< O0 > &&weakly_incrementable< O1 > &&indirectly_copyable< I, O0 > &&indirectly_copyable< I, O1 > &&indirect_unary_predicate< C, projected< I, P >>) ccconstexpr partition_copy_result< I
 function template partition_copy
 
template<typename I , typename SI , typename O , typename SO , typename C = less, typename PI = identity, typename PO = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&sentinel_for< SI, I > &&random_access_iterator< O > &&sentinel_for< SO, O > &&indirectly_copyable< I, O > &&sortable< O, C, PO > &&indirect_strict_weak_order< C, projected< I, PI >, projected< O, PO >>) ccconstexpr O partial_sort_copy(I first
 function template partial_sort_copy
 
template<typename I , typename O , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I > &&weakly_incrementable< O > &&indirectly_copyable< I, O >) ccconstexpr copy_n_result< I
 function template copy_n
 
template<typename I0 , typename S0 , typename I1 , typename S1 , typename R = equal_to, typename P0 = identity, typename P1 = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I0 > &&sentinel_for< S0, I0 > &&forward_iterator< I1 > &&sentinel_for< S1, I1 > &&indirect_relation< R, projected< I0, P0 >, projected< I1, P1 >>) ccconstexpr I0 find_first_of(I0 begin0
 function template find_first_of
 
template<typename I0 , typename S0 , typename I1 , typename S1 , typename C = less, typename P0 = identity, typename P1 = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I0 > &&sentinel_for< S0, I0 > &&input_iterator< I1 > &&sentinel_for< S1, I1 > &&indirect_strict_weak_order< C, projected< I0, P0 >, projected< I1, P1 >>) ccconstexpr bool lexicographical_compare(I0 begin0
 function template lexicographical_compare
 
template<typename I0 , typename S0 , typename I1 , typename S1 , typename O , typename F , typename P0 = identity, typename P1 = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I0 > &&sentinel_for< S0, I0 > &&input_iterator< I1 > &&sentinel_for< S1, I1 > &&weakly_incrementable< O > &&copy_constructible< F > &&indirectly_writable< O, indirect_result_t< F &, projected< I0, P0 >, projected< I1, P1 >>>) ccconstexpr binary_transform_result< I0
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename I1 , typename S1 , typename I2 >
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I1 > &&sentinel_for< S1, I1 > &&input_iterator< I2 > &&indirectly_swappable< I1, I2 >) ccconstexpr swap_ranges_result< I1
 function template swap_ranges
 
template<typename I1 , typename S1 , typename I2 , typename S2 , typename C = less, typename P1 = identity, typename P2 = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I1 > &&sentinel_for< S1, I1 > &&input_iterator< I2 > &&sentinel_for< S2, I2 > &&indirect_strict_weak_order< C, projected< I1, P1 >, projected< I2, P2 >>) ccconstexpr bool includes(I1 begin1
 function template includes
 
template<typename I1 , typename S1 , typename I2 , typename S2 , typename Comp = equal_to, typename Proj1 = identity, typename Proj2 = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I1 > &&sentinel_for< S1, I1 > &&input_iterator< I2 > &&sentinel_for< S2, I2 > &&indirectly_comparable< I1, I2, Comp, Proj1, Proj2 >) ccconstexpr bool starts_with(I1 first1
 function template starts_with
 
template<typename I1 , typename S1 , typename I2 , typename S2 >
CPP_TEMPLATE_AUX_0 ranges::c (requires input_iterator< I1 > &&sentinel_for< S1, I1 > &&input_iterator< I2 > &&sentinel_for< S2, I2 > &&indirectly_swappable< I1, I2 >) ccconstexpr swap_ranges_result< I1
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng , typename F , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_range< Rng > &&indirectly_unary_invocable< F, projected< iterator_t< Rng >, P >>) ccconstexpr for_each_result< borrowed_iterator_t< Rng >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng , typename O , typename C , typename T , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_range< Rng > &&output_iterator< O, T const & > &&indirect_unary_predicate< C, projected< iterator_t< Rng >, P >> &&indirectly_copyable< iterator_t< Rng >, O >) ccconstexpr replace_copy_if_result< borrowed_iterator_t< Rng >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng , typename O , typename T1 , typename T2 , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_range< Rng > &&output_iterator< O, T2 const & > &&indirectly_copyable< iterator_t< Rng >, O > &&indirect_relation< equal_to, projected< iterator_t< Rng >, P >, T1 const * >) ccconstexpr replace_copy_result< borrowed_iterator_t< Rng >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng , typename O , typename F , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_range< Rng > &&weakly_incrementable< O > &&copy_constructible< F > &&indirectly_writable< O, indirect_result_t< F &, projected< iterator_t< Rng >, P >>>) ccconstexpr unary_transform_result< borrowed_iterator_t< Rng >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng , typename O , typename T , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_range< Rng > &&weakly_incrementable< O > &&indirect_relation< equal_to, projected< iterator_t< Rng >, P >, T const * > &&indirectly_copyable< iterator_t< Rng >, O >) ccconstexpr remove_copy_result< borrowed_iterator_t< Rng >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng , typename O , typename C , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_range< Rng > &&weakly_incrementable< O > &&indirect_unary_predicate< C, projected< iterator_t< Rng >, P >> &&indirectly_copyable< iterator_t< Rng >, O >) ccconstexpr remove_copy_if_result< borrowed_iterator_t< Rng >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng , typename O , typename F , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_range< Rng > &&weakly_incrementable< O > &&indirect_unary_predicate< F, projected< iterator_t< Rng >, P >> &&indirectly_copyable< iterator_t< Rng >, O >) ccconstexpr copy_if_result< borrowed_iterator_t< Rng >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng , typename O >
CPP_TEMPLATE_AUX_0 ranges::c (requires input_range< Rng > &&weakly_incrementable< O > &&indirectly_copyable< iterator_t< Rng >, O >) ccconstexpr copy_result< borrowed_iterator_t< Rng >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng , typename O >
CPP_TEMPLATE_AUX_0 ranges::c (requires input_range< Rng > &&weakly_incrementable< O > &&indirectly_movable< iterator_t< Rng >, O >) ccconstexpr move_result< borrowed_iterator_t< Rng >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng , typename O0 , typename O1 , typename C , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_range< Rng > &&weakly_incrementable< O0 > &&weakly_incrementable< O1 > &&indirectly_copyable< iterator_t< Rng >, O0 > &&indirectly_copyable< iterator_t< Rng >, O1 > &&indirect_unary_predicate< C, projected< iterator_t< Rng >, P >>) ccconstexpr partition_copy_result< borrowed_iterator_t< Rng >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng0 , typename Rng1 , typename O , typename F , typename P0 = identity, typename P1 = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires input_range< Rng0 > &&input_range< Rng1 > &&weakly_incrementable< O > &&copy_constructible< F > &&indirectly_writable< O, indirect_result_t< F &, projected< iterator_t< Rng0 >, P0 >, projected< iterator_t< Rng1 >, P1 >>>) ccconstexpr binary_transform_result< borrowed_iterator_t< Rng0 >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng1 , typename I2_ >
CPP_TEMPLATE_AUX_0 ranges::c (requires input_range< Rng1 > &&input_iterator< uncvref_t< I2_ >> &&indirectly_swappable< iterator_t< Rng1 >, uncvref_t< I2_ >>) ccconstexpr swap_ranges_result< iterator_t< Rng1 >
 
template<typename Rng1 , typename Rng2 >
CPP_TEMPLATE_AUX_0 ranges::c (requires input_range< Rng1 > &&input_range< Rng2 > &&indirectly_swappable< iterator_t< Rng1 >, iterator_t< Rng2 >>) ccconstexpr swap_ranges_result< borrowed_iterator_t< Rng1 >
 
template<typename O , typename S , typename F >
CPP_TEMPLATE_AUX_0 ranges::c (requires invocable< F & > &&output_iterator< O, invoke_result_t< F & >> &&sentinel_for< S, O >) ccconstexpr generate_result< O
 function template generate_n
 
template<typename O , typename F >
CPP_TEMPLATE_AUX_0 ranges::c (requires invocable< F & > &&output_iterator< O, invoke_result_t< F & >>) ccconstexpr generate_n_result< O
 function template generate_n
 
template<typename Rng , typename F >
CPP_TEMPLATE_AUX_0 ranges::c (requires invocable< F & > &&output_range< Rng, invoke_result_t< F & >>) ccconstexpr generate_result< borrowed_iterator_t< Rng >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename O , typename S , typename V >
CPP_TEMPLATE_AUX_0 ranges::c (requires output_iterator< O, V const & > &&sentinel_for< S, O >) ccconstexpr O fill(O first
 function template fill
 
template<typename O , typename V >
CPP_TEMPLATE_AUX_0 ranges::c (requires output_iterator< O, V const & >) ccconstexpr O fill_n(O first
 function template equal
 
template<typename Rng , typename V >
CPP_TEMPLATE_AUX_0 ranges::c (requires output_range< Rng, V const & >) ccconstexpr borrowed_iterator_t< Rng > fill(Rng &&rng
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename I , typename S , typename T , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires permutable< I > &&sentinel_for< S, I > &&indirect_relation< equal_to, projected< I, P >, T const * >) ccconstexpr I remove(I first
 function template remove
 
template<typename I , typename S , typename Pred , typename Proj = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires permutable< I > &&sentinel_for< S, I > &&indirect_relation< Pred, projected< I, Proj >>) ccconstexpr I adjacent_remove_if(I first
 function adjacent_remove_if More...
 
template<typename I , typename S , typename C , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires permutable< I > &&sentinel_for< S, I > &&indirect_unary_predicate< C, projected< I, P >>) ccconstexpr I partition(I first
 function template partition More...
 
template<typename I , typename S >
CPP_TEMPLATE_AUX_0 ranges::c (requires permutable< I > &&sentinel_for< S, I >) ccconstexpr subrange< I > rotate(I first
 function template rotate
 
template<typename I , typename S , typename C = less, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires random_access_iterator< I > &&sentinel_for< S, I > &&indirect_strict_weak_order< C, projected< I, P >>) ccconstexpr I is_heap_until(I first
 function template is_heap_until
 
template<typename I , typename S , typename C = less, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires random_access_iterator< I > &&sortable< I, C, P >) ccconstexpr I nth_element(I first
 function template nth_element
 
template<typename Rng , typename I = iterator_t<Rng>>
CPP_TEMPLATE_AUX_0 ranges::c (requires range< Rng > &&permutable< I >) ccconstexpr borrowed_subrange_t< Rng > rotate(Rng &&rng
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng , typename O , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires range< Rng > &&weakly_incrementable< O > &&indirectly_copyable< iterator_t< Rng >, O >) ccconstexpr rotate_copy_result< borrowed_iterator_t< Rng >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng0 , typename Rng1 , typename O , typename C = less, typename P0 = identity, typename P1 = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires range< Rng0 > &&range< Rng1 > &&mergeable< iterator_t< Rng0 >, iterator_t< Rng1 >, O, C, P0, P1 >) ccconstexpr merge_result< borrowed_iterator_t< Rng0 >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng1 , typename Rng2 , typename O , typename C = less, typename P1 = identity, typename P2 = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires range< Rng1 > &&range< Rng2 > &&mergeable< iterator_t< Rng1 >, iterator_t< Rng2 >, O, C, P1, P2 >) ccconstexpr set_union_result< borrowed_iterator_t< Rng1 >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename I0 , typename S0 , typename I1 , typename S1 , typename O , typename C = less, typename P0 = identity, typename P1 = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires sentinel_for< S0, I0 > &&sentinel_for< S1, I1 > &&mergeable< I0, I1, O, C, P0, P1 >) ccconstexpr merge_result< I0
 function template merge
 
template<typename I1 , typename S1 , typename I2 , typename S2 , typename O , typename C = less, typename P1 = identity, typename P2 = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires sentinel_for< S1, I1 > &&sentinel_for< S2, I2 > &&mergeable< I1, I2, O, C, P1, P2 >) ccconstexpr set_union_result< I1
 function template set_union More...
 
template<typename I , typename S , typename C = less, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires sortable< I, C, P > &&random_access_iterator< I > &&sentinel_for< S, I >) ccconstexpr I partial_sort(I first
 function template partial_sort More...
 
template<typename I , typename S , typename C = equal_to, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires sortable< I, C, P > &&sentinel_for< S, I >) ccconstexpr I unique(I first
 template function unique More...
 
template<typename I0 , typename S0 , typename I1 , typename S1 , typename C = equal_to, typename P0 = identity, typename P1 = identity>
CPP_TEMPLATE_AUX_0 ranges::c (requires((forward_iterator< I0 > &&sentinel_for< S0, I0 >)||(input_iterator< I0 > &&sized_sentinel_for< S0, I0 >)) &&((forward_iterator< I1 > &&sentinel_for< S1, I1 >)||(input_iterator< I1 > &&sized_sentinel_for< S1, I1 >)) &&indirectly_comparable< I0, I1, C, P0, P1 >) ccconstexpr bool ends_with(I0 begin0
 function template ends_with
 
CPP_TEMPLATE_AUX_0ranges::copy (I first, S last, O out)
 
CPP_TEMPLATE_AUX_0ranges::copy (Rng &&rng, O out)
 
CPP_TEMPLATE_AUX_0ranges::copy_backward (I first, S end_, O out)
 
CPP_TEMPLATE_AUX_0 constexpr O ranges::copy_backward (Rng &&rng, O out)
 
CPP_TEMPLATE_AUX_0ranges::copy_if (I first, S last, O out, F pred, P proj=P{})
 
CPP_TEMPLATE_AUX_0ranges::copy_if (Rng &&rng, O out, F pred, P proj=P{})
 
CPP_TEMPLATE_AUX_0ranges::copy_n (I first, iter_difference_t< I > n, O out)
 
template<typename R , typename Op >
 ranges::CPP_TEMPLATE_AUX_0 (requires bidirectional_range< R > &&indirectly_binary_right_foldable< Op, range_value_t< R >, iterator_t< R >> &&constructible_from< range_value_t< R >, range_reference_t< R >>) const expr auto fold_right_last(R &&rng
 
template<typename Rng , typename T , typename Op >
 ranges::CPP_TEMPLATE_AUX_0 (requires bidirectional_range< Rng > &&indirectly_binary_right_foldable< Op, T, iterator_t< Rng >>) const expr auto fold_right(Rng &&rng
 
template<typename I , typename S , typename O , typename C = equal_to, typename P = identity>
 ranges::CPP_TEMPLATE_AUX_0 (requires input_iterator< I > &&sentinel_for< S, I > &&indirect_relation< C, projected< I, P >> &&weakly_incrementable< O > &&indirectly_copyable< I, O > &&(forward_iterator< I >||forward_iterator< O >||indirectly_copyable_storable< I, O >)) const expr unique_copy_result< I
 template function unique_copy More...
 
template<typename R , typename Op >
 ranges::CPP_TEMPLATE_AUX_0 (requires input_range< R > &&indirectly_binary_left_foldable< Op, range_value_t< R >, iterator_t< R >> &&constructible_from< range_value_t< R >, range_reference_t< R >>) const expr auto fold_left_first(R &&rng
 
template<typename Rng , typename O , typename C = equal_to, typename P = identity>
 ranges::CPP_TEMPLATE_AUX_0 (requires input_range< Rng > &&indirect_relation< C, projected< iterator_t< Rng >, P >> &&weakly_incrementable< O > &&indirectly_copyable< iterator_t< Rng >, O > &&(forward_iterator< iterator_t< Rng >>||forward_iterator< O >||indirectly_copyable_storable< iterator_t< Rng >, O >)) const expr unique_copy_result< borrowed_iterator_t< Rng >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng , typename T , typename Op >
 ranges::CPP_TEMPLATE_AUX_0 (requires input_range< Rng > &&indirectly_binary_left_foldable< Op, T, iterator_t< Rng >>) const expr auto fold_left(Rng &&rng
 
template<typename I , typename S , typename Op >
 ranges::CPP_TEMPLATE_AUX_0 (requires sentinel_for< S, I > &&bidirectional_iterator< I > &&indirectly_binary_right_foldable< Op, iter_value_t< I >, I > &&constructible_from< iter_value_t< I >, iter_reference_t< I >>) const expr auto fold_right_last(I first
 
template<typename I , typename S , typename T , typename Op >
 ranges::CPP_TEMPLATE_AUX_0 (requires sentinel_for< S, I > &&bidirectional_iterator< I > &&indirectly_binary_right_foldable< Op, T, I >) const expr auto fold_right(I first
 
template<typename I , typename S , typename Op >
 ranges::CPP_TEMPLATE_AUX_0 (requires sentinel_for< S, I > &&input_iterator< I > &&indirectly_binary_left_foldable< Op, iter_value_t< I >, I > &&constructible_from< iter_value_t< I >, iter_reference_t< I >>) const expr auto fold_left_first(I first
 
template<typename I , typename S , typename T , typename Op >
 ranges::CPP_TEMPLATE_AUX_0 (requires sentinel_for< S, I > &&input_iterator< I > &&indirectly_binary_left_foldable< Op, T, I >) const expr auto fold_left(I first
 
 ranges::for (++first;first !=last;++first)
 
 ranges::for (;n !=0;++b, --n) *b
 
CPP_TEMPLATE_AUX_0ranges::for_each (I first, S last, F fun, P proj=P{})
 
CPP_TEMPLATE_AUX_0ranges::for_each (Rng &&rng, F fun, P proj=P{})
 
CPP_TEMPLATE_AUX_0ranges::generate (O first, S last, F fun)
 
CPP_TEMPLATE_AUX_0ranges::generate (Rng &&rng, F fun)
 
CPP_TEMPLATE_AUX_0ranges::generate_n (O first, iter_difference_t< O > n, F fun)
 
template<typename I , typename S , typename C , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::I (requires bidirectional_iterator< I > &&sentinel_for< S, I > &&indirect_unary_predicate< C, projected< I, P >> &&permutable< I >) III stable_partition(I first
 function template stable_partition
 
template<typename I , typename S , typename C = less, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::I (requires bidirectional_iterator< I > &&sortable< I, C, P >) III inplace_merge(I first
 function template inplace_merge
 
template<typename I , typename S , typename Gen = detail::default_random_engine &>
CPP_TEMPLATE_AUX_0 ranges::I (requires random_access_iterator< I > &&sentinel_for< S, I > &&permutable< I > &&uniform_random_bit_generator< std::remove_reference_t< Gen >> &&convertible_to< invoke_result_t< Gen & >, iter_difference_t< I >>) III shuffle(I const first
 function template shuffle
 
template<typename I , typename S , typename C = less, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::I (requires sortable< I, C, P > &&random_access_iterator< I > &&sentinel_for< S, I >) III stable_sort(I first
 function template stable_sort
 
 ranges::if (first==last)
 
CPP_TEMPLATE_AUX_0ranges::merge (I0 begin0, S0 end0, I1 begin1, S1 end1, O out, C pred=C{}, P0 proj0=P0{}, P1 proj1=P1{})
 
CPP_TEMPLATE_AUX_0ranges::merge (Rng0 &&rng0, Rng1 &&rng1, O out, C pred=C{}, P0 proj0=P0{}, P1 proj1=P1{})
 
CPP_TEMPLATE_AUX_0ranges::move (I first, S last, O out)
 
CPP_TEMPLATE_AUX_0ranges::move (Rng &&rng, O out)
 
CPP_TEMPLATE_AUX_0ranges::move_backward (I first, S end_, O out)
 
CPP_TEMPLATE_AUX_0ranges::move_backward (Rng &&rng, O out)
 
return ranges::optional< U > (in_place, fold_left_fn{}(std::move(first), std::move(last), std::move(init), op))
 
return ranges::optional< U > (in_place, fold_right_fn{}(std::move(first), tail, iter_value_t< I >(*tail), std::move(op)))
 
CPP_TEMPLATE_AUX_0 O1 ranges::partition_copy (I first, S last, O0 o0, O1 o1, C pred, P proj=P{})
 
CPP_TEMPLATE_AUX_0 O1 ranges::partition_copy (Rng &&rng, O0 o0, O1 o1, C pred, P proj=P{})
 
return ranges::recounted (first, b, norig)
 
CPP_TEMPLATE_AUX_0ranges::remove_copy (I first, S last, O out, T const &val, P proj=P{})
 
CPP_TEMPLATE_AUX_0ranges::remove_copy (Rng &&rng, O out, T const &val, P proj=P{})
 
CPP_TEMPLATE_AUX_0ranges::remove_copy_if (I first, S last, O out, C pred, P proj=P{})
 
CPP_TEMPLATE_AUX_0ranges::remove_copy_if (Rng &&rng, O out, C pred, P proj=P{})
 
CPP_TEMPLATE_AUX_0ranges::replace_copy (I first, S last, O out, T1 const &old_value, T2 const &new_value, P proj={})
 
CPP_TEMPLATE_AUX_0ranges::replace_copy (Rng &&rng, O out, T1 const &old_value, T2 const &new_value, P proj={})
 
CPP_TEMPLATE_AUX_0ranges::replace_copy_if (I first, S last, O out, C pred, T const &new_value, P proj={})
 
CPP_TEMPLATE_AUX_0ranges::replace_copy_if (Rng &&rng, O out, C pred, T const &new_value, P proj={})
 
CPP_TEMPLATE_AUX_0ranges::reverse_copy (I first, S end_, O out)
 
CPP_TEMPLATE_AUX_0ranges::reverse_copy (Rng &&rng, O out)
 
CPP_TEMPLATE_AUX_0ranges::rotate_copy (I first, I middle, S last, O out)
 
CPP_TEMPLATE_AUX_0ranges::rotate_copy (Rng &&rng, iterator_t< Rng > middle, O out)
 
template<typename I , typename S , typename ORng , typename Gen = detail::default_random_engine &>
CPP_TEMPLATE_AUX_0 ranges::s (requires input_iterator< I > &&sentinel_for< S, I > &&weakly_incrementable< iterator_t< ORng >> &&indirectly_copyable< I, iterator_t< ORng >> &&uniform_random_bit_generator< std::remove_reference_t< Gen >> &&(forward_range< ORng >||sized_range< ORng >) &&(random_access_iterator< iterator_t< ORng >>||forward_iterator< I >||sized_sentinel_for< S, I >)) sssample_result< I
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename I , typename S , typename O , typename Gen = detail::default_random_engine &>
CPP_TEMPLATE_AUX_0 ranges::s (requires input_iterator< I > &&sentinel_for< S, I > &&weakly_incrementable< O > &&indirectly_copyable< I, O > &&uniform_random_bit_generator< std::remove_reference_t< Gen >> &&(random_access_iterator< O >||forward_iterator< I >||sized_sentinel_for< S, I >)) sssample_result< I
 function template sample
 
template<typename IRng , typename ORng , typename Gen = detail::default_random_engine &>
CPP_TEMPLATE_AUX_0 ranges::s (requires input_range< IRng > &&range< ORng > &&indirectly_copyable< iterator_t< IRng >, iterator_t< ORng >> &&uniform_random_bit_generator< std::remove_reference_t< Gen >> &&(random_access_iterator< iterator_t< ORng >>||forward_range< IRng >||sized_range< IRng >) &&(forward_range< ORng >||sized_range< ORng >)) sssample_result< borrowed_iterator_t< IRng >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename Rng , typename O , typename Gen = detail::default_random_engine &>
CPP_TEMPLATE_AUX_0 ranges::s (requires input_range< Rng > &&weakly_incrementable< O > &&indirectly_copyable< iterator_t< Rng >, O > &&uniform_random_bit_generator< std::remove_reference_t< Gen >> &&(random_access_iterator< O >||forward_range< Rng >||sized_range< Rng >)) sssample_result< borrowed_iterator_t< Rng >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
CPP_TEMPLATE_AUX_0ranges::sample (I first, S last, O out, iter_difference_t< O > const n, Gen &&gen=detail::get_random_engine())
 
CPP_TEMPLATE_AUX_0 borrowed_iterator_t< ORng > ranges::sample (I first, S last, ORng &&out, Gen &&gen=detail::get_random_engine())
 
CPP_TEMPLATE_AUX_0 borrowed_iterator_t< ORng > ranges::sample (IRng &&rng, ORng &&out, Gen &&gen=detail::get_random_engine())
 
CPP_TEMPLATE_AUX_0ranges::sample (Rng &&rng, O out, iter_difference_t< O > const n, Gen &&gen=detail::get_random_engine())
 
CPP_TEMPLATE_AUX_0ranges::set_difference (I1 begin1, S1 end1, I2 begin2, S2 end2, O out, C pred=C{}, P1 proj1=P1{}, P2 proj2=P2{})
 
CPP_TEMPLATE_AUX_0ranges::set_difference (Rng1 &&rng1, Rng2 &&rng2, O out, C pred=C{}, P1 proj1=P1{}, P2 proj2=P2{})
 
CPP_TEMPLATE_AUX_0ranges::set_symmetric_difference (I1 begin1, S1 end1, I2 begin2, S2 end2, O out, C pred=C{}, P1 proj1=P1{}, P2 proj2=P2{})
 
CPP_TEMPLATE_AUX_0ranges::set_symmetric_difference (Rng1 &&rng1, Rng2 &&rng2, O out, C pred=C{}, P1 proj1=P1{}, P2 proj2=P2{})
 
CPP_TEMPLATE_AUX_0ranges::set_union (I1 begin1, S1 end1, I2 begin2, S2 end2, O out, C pred=C{}, P1 proj1=P1{}, P2 proj2=P2{})
 
CPP_TEMPLATE_AUX_0ranges::set_union (Rng1 &&rng1, Rng2 &&rng2, O out, C pred=C{}, P1 proj1=P1{}, P2 proj2=P2{})
 
CPP_TEMPLATE_AUX_0 I2 ranges::swap_ranges (I1 begin1, S1 end1, I2 begin2)
 
CPP_TEMPLATE_AUX_0 I2 ranges::swap_ranges (I1 begin1, S1 end1, I2 begin2, S2 end2)
 
CPP_TEMPLATE_AUX_0 uncvref_t< I2_ > ranges::swap_ranges (Rng1 &&rng1, I2_ &&begin2)
 
CPP_TEMPLATE_AUX_0 borrowed_iterator_t< Rng2 > ranges::swap_ranges (Rng1 &&rng1, Rng2 &&rng2)
 
CPP_TEMPLATE_AUX_0ranges::transform (I first, S last, O out, F fun, P proj=P{})
 
CPP_TEMPLATE_AUX_0ranges::transform (I0 begin0, S0 end0, I1 begin1, S1 end1, O out, F fun, P0 proj0=P0{}, P1 proj1=P1{})
 
CPP_TEMPLATE_AUX_0ranges::transform (Rng &&rng, O out, F fun, P proj=P{})
 
CPP_TEMPLATE_AUX_0ranges::transform (Rng0 &&rng0, Rng1 &&rng1, O out, F fun, P0 proj0=P0{}, P1 proj1=P1{})
 
ranges::unique_copy (I first, S last, O out, C pred=C{}, P proj=P{})
 
ranges::unique_copy (Rng &&rng, O out, C pred=C{}, P proj=P{})
 
 ranges::while (first !=tail)
 

Variables

ranges::accum = invoke(op, std::move(init), *first)
 
auto ranges::b = uncounted(first)
 
CPP_TEMPLATE_AUX_0 S0 I1 ranges::begin1
 
CPP_TEMPLATE_AUX_0 S1 I2 ranges::begin2
 
CPP_TEMPLATE_AUX_0 ranges::borrowed_iterator_t< Rng1 >
 
CPP_TEMPLATE_AUX_0 ranges::borrowed_iterator_t< Rng2 >
 
CPP_TEMPLATE_AUX_0 S C P ranges::C = equal_to
 
CPP_TEMPLATE_AUX_0 S iter_difference_t< I > ranges::cnt
 
CPP_TEMPLATE_AUX_0 S1 I2 S2 Comp ranges::comp = {}
 
CPP_TEMPLATE_AUX_0 S1 I2 S2 Comp Proj1 Proj2 ranges::Comp = equal_to
 
CPP_TEMPLATE_AUX_0 S0 ranges::end0
 
CPP_TEMPLATE_AUX_0 S0 I1 S1 ranges::end1
 
CPP_TEMPLATE_AUX_0 S1 I2 S2 ranges::end2
 
CPP_TEMPLATE_AUX_0 I S ranges::end_
 
CPP_TEMPLATE_AUX_0 S F P ranges::F
 
return ranges::first
 
CPP_TEMPLATE_AUX_0 S1 I2 ranges::first2
 
CPP_TEMPLATE_AUX_0 iter_difference_t< I > F ranges::fun
 
CPP_TEMPLATE_AUX_0 S const Gen && ranges::gen
 
CPP_TEMPLATE_AUX_0 ranges::I1
 
CPP_TEMPLATE_AUX_0 S1 I2 S2 C P1 P2 ranges::I2
 
CPP_TEMPLATE_AUX_0 SI O SO C PI ranges::in_proj = PI{}
 
S T ranges::init = *first
 
CPP_TEMPLATE_AUX_0ranges::last
 
CPP_TEMPLATE_AUX_0 S1 ranges::last1
 
CPP_TEMPLATE_AUX_0 S1 I2 S2 ranges::last2
 
CPP_TEMPLATE_AUX_0ranges::middle
 
CPP_TEMPLATE_AUX_0 iter_difference_t< O > ranges::n
 
CPP_TEMPLATE_AUX_0 S T1 const T2 const & ranges::new_value
 
auto ranges::norig = n
 
CPP_TEMPLATE_AUX_0ranges::nth
 
CPP_TEMPLATE_AUX_0 S1 I2 S2 O C P1 P2 ranges::O
 
CPP_TEMPLATE_AUX_0 ranges::O0
 
CPP_TEMPLATE_AUX_0 S T1 const & ranges::old_value
 
S T Op ranges::op
 
CPP_TEMPLATE_AUX_0 S1 I2 S2 O ranges::out
 
CPP_TEMPLATE_AUX_0 SI O ranges::out_begin
 
CPP_TEMPLATE_AUX_0 SI O SO ranges::out_end
 
CPP_TEMPLATE_AUX_0 SI O SO C PI PO ranges::out_proj
 
CPP_TEMPLATE_AUX_0 SI O SO C PI PO ranges::OutRng
 
CPP_TEMPLATE_AUX_0 S C P ranges::P
 
CPP_TEMPLATE_AUX_0 S0 I1 S1 C P0 P1 ranges::P0 = identity
 
CPP_TEMPLATE_AUX_0 S1 I2 S2 C P1 P2 ranges::P1 = identity
 
CPP_TEMPLATE_AUX_0 S1 I2 S2 C P1 P2 ranges::P2
 
CPP_TEMPLATE_AUX_0 SI O SO C PI PO ranges::PI = identity
 
CPP_TEMPLATE_AUX_0 S C ranges::pred = C{}
 
CPP_TEMPLATE_AUX_0 S Pred Proj ranges::Pred
 
CPP_TEMPLATE_AUX_0 S C P ranges::proj
 
CPP_TEMPLATE_AUX_0 S0 I1 S1 C P0 ranges::proj0 = P0{}
 
CPP_TEMPLATE_AUX_0 S0 I1 S1 C P0 P1 ranges::proj1
 
CPP_TEMPLATE_AUX_0 S1 I2 S2 Comp Proj1 Proj2 ranges::Proj1 = identity
 
CPP_TEMPLATE_AUX_0 S1 I2 S2 C P1 P2 ranges::proj2
 
CPP_TEMPLATE_AUX_0 S R P ranges::R = equal_to
 
CPP_TEMPLATE_AUX_0 S1 I2 S2 Comp Proj1 Proj2 ranges::R2
 
CPP_TEMPLATE_AUX_0 S R ranges::rel = R{}
 
CPP_TEMPLATE_AUX_0 S0 I1 S1 C P0 P1 ranges::Rng1
 
CPP_TEMPLATE_AUX_0 S1 I2 S2 R P ranges::Rng2
 
CPP_TEMPLATE_AUX_0 S C P ranges::S
 
CPP_TEMPLATE_AUX_0 S const T P ranges::T
 
CPP_TEMPLATE_AUX_0 S T1 const T2 const P ranges::T1
 
CPP_TEMPLATE_AUX_0 S T1 const T2 const P ranges::T2
 
ranges::tail = next(first, last)
 
CPP_TEMPLATE_AUX_0 S V const C P ranges::V
 
CPP_TEMPLATE_AUX_0 S V const & ranges::val
 

Detailed Description

Iterator- and range-based algorithms, like the standard algorithms.

Function Documentation

◆ c() [1/13]

template<typename I , typename C , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c ( requires bidirectional_iterator< I > &&permutable< I > &&indirect_unary_predicate< C, projected< I, P >>  )

#include <range/v3/algorithm/unstable_remove_if.hpp>

unstable_remove have O(1) complexity for each element remove, unlike remove O(n) [for worst case]. Each erased element overwritten (moved in) with last one. unstable_remove_if does not preserve relative element order.

function template unstable_remove_if

◆ c() [2/13]

template<typename I , typename S , typename C = equal_to, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c ( requires forward_iterator< I > &&sentinel_for< S, I > &&indirect_relation< C, projected< I, P >>  )

#include <range/v3/algorithm/adjacent_find.hpp>

function template adjacent_find

range-based version of the adjacent_find std algorithm

Precondition
Rng is a model of the range concept
C is a model of the BinaryPredicate concept

◆ c() [3/13]

template<typename I , typename S , typename C = less, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c ( requires forward_iterator< I > &&sentinel_for< S, I > &&indirect_strict_weak_order< C, projected< I, P >>  )

#include <range/v3/algorithm/max_element.hpp>

function template max_element

function template minmax_element

function template min_element

◆ c() [4/13]

template<typename I , typename S , typename V , typename C = less, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c ( requires forward_iterator< I > &&sentinel_for< S, I > &&indirect_strict_weak_order< C, V const *, projected< I, P >>  )

#include <range/v3/algorithm/binary_search.hpp>

function template binary_search

function template upper_bound

function template lower_bound

function template equal_range

range-based version of the binary_search std algorithm

Precondition
Rng is a model of the range concept

◆ c() [5/13]

template<typename I , typename S , typename R = less, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c ( requires forward_iterator< I > &&sentinel_for< S, I > &&indirect_strict_weak_order< R, projected< I, P >>  )

#include <range/v3/algorithm/is_sorted.hpp>

template function is_sorted

template function is_sorted_until

range-based version of the is_sorted std algorithm

Works on forward_ranges

Precondition
Rng is a model of the forward_range concept
I is a model of the forward_iterator concept
S and I model the sentinel_for<S, I> concept
R and projected<I, P> model the indirect_strict_weak_order<R, projected<I, P>> concept

range-based version of the is_sorted_until std algorithm

Works on forward_ranges

Precondition
Rng is a model of the forward_range concept
I is a model of the forward_iterator concept
S and I model the sentinel_for<S, I> concept
R and projected<I, P> model the indirect_strict_weak_order<R, projected<I, P>> concept

◆ c() [6/13]

template<typename T , typename C = less, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c ( requires indirect_strict_weak_order< C, projected< T const *, P >>  ) const &

#include <range/v3/algorithm/max.hpp>

function template max

function template minmax

function template min

◆ c() [7/13]

template<typename I , typename S , typename V , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c ( requires input_iterator< I > &&sentinel_for< S, I > &&indirect_relation< equal_to, projected< I, P >, V const * >  ) const

#include <range/v3/algorithm/count.hpp>

function template count

template function find

range-based version of the find std algorithm

Precondition
Rng is a model of the range concept
I is a model of the input_iterator concept
S is a model of the sentinel_for<I> concept
P is a model of the invocable<iter_common_reference_t<I>> concept
The ResultType of P is equality_comparable with V

◆ c() [8/13]

template<typename I , typename S , typename F , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c ( requires input_iterator< I > &&sentinel_for< S, I > &&indirect_unary_predicate< F, projected< I, P >>  )

#include <range/v3/algorithm/all_of.hpp>

function template all_of

function template none_of

template function find_if_not

template function find

function template any_of

range-based version of the find std algorithm

Precondition
Rng is a model of the range concept
I is a model of the input_iterator concept
S is a model of the sentinel_for<I> concept
P is a model of the invocable<V> concept, where V is the value type of I.
F models predicate<X>, where X is the result type of invocable<P, V>

range-based version of the find_if_not std algorithm

Precondition
Rng is a model of the range concept
I is a model of the input_iterator concept
S is a model of the sentinel_for<I> concept
P is a model of the invocable<V> concept, where V is the value type of I.
F models predicate<X>, where X is the result type of invocable<P, V>

◆ c() [9/13]

template<typename I , typename S , typename Pred , typename Proj = identity>
CPP_TEMPLATE_AUX_0 ranges::c ( requires permutable< I > &&sentinel_for< S, I > &&indirect_relation< Pred, projected< I, Proj >>  )

#include <range/v3/algorithm/adjacent_remove_if.hpp>

function adjacent_remove_if

range-based version of the adjacent_remove_if algorithm

Precondition
Rng is a model of the forward_range concept.
Pred is a model of the BinaryPredicate concept.

◆ c() [10/13]

template<typename I , typename S , typename C , typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c ( requires permutable< I > &&sentinel_for< S, I > &&indirect_unary_predicate< C, projected< I, P >>  )

#include <range/v3/algorithm/partition.hpp>

function template partition

function template remove_if

◆ c() [11/13]

template<typename I1 , typename S1 , typename I2 , typename S2 , typename O , typename C = less, typename P1 = identity, typename P2 = identity>
CPP_TEMPLATE_AUX_0 ranges::c ( requires sentinel_for< S1, I1 > &&sentinel_for< S2, I2 > &&mergeable< I1, I2, O, C, P1, P2 >  )

#include <range/v3/algorithm/set_algorithm.hpp>

function template set_union

function template set_symmetric_difference

function template set_difference

function template set_intersection

◆ c() [12/13]

template<typename I , typename S , typename C = less, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c ( requires sortable< I, C, P > &&random_access_iterator< I > &&sentinel_for< S, I >  )

#include <range/v3/algorithm/partial_sort.hpp>

function template partial_sort

function template sort

◆ c() [13/13]

template<typename I , typename S , typename C = equal_to, typename P = identity>
CPP_TEMPLATE_AUX_0 ranges::c ( requires sortable< I, C, P > &&sentinel_for< S, I >  )

#include <range/v3/algorithm/unique.hpp>

template function unique

range-based version of the unique std algorithm

Precondition
Rng is a model of the forward_range concept
I is a model of the forward_iterator concept
S is a model of the sentinel_for concept
C is a model of the relation concept

◆ CPP_TEMPLATE_AUX_0()

template<typename I , typename S , typename O , typename C = equal_to, typename P = identity>
ranges::CPP_TEMPLATE_AUX_0 ( requires input_iterator< I > &&sentinel_for< S, I > &&indirect_relation< C, projected< I, P >> &&weakly_incrementable< O > &&indirectly_copyable< I, O > &&  forward_iterator< I >||forward_iterator< O >|| indirectly_copyable_storable< I, O >) const

#include <range/v3/algorithm/unique_copy.hpp>

template function unique_copy

range-based version of the unique_copy std algorithm

Precondition
Rng is a model of the input_range concept
O is a model of the weakly_incrementable concept
C is a model of the relation concept

Variable Documentation

◆ end_

CPP_TEMPLATE_AUX_0 S ranges::end_

#include <range/v3/algorithm/nth_element.hpp>

Initial value:
{
I last = ranges::next(first, end_)
CPP_TEMPLATE_AUX_0 I(requires bidirectional_iterator< I > &&sortable< I, C, P >) III inplace_merge(I first
function template inplace_merge
constexpr next_fn next
Definition: operations.hpp:316
front< Pair > first
Retrieve the first element of the pair Pair.
Definition: meta.hpp:2251

◆ gen

CPP_TEMPLATE_AUX_0 S const Gen&& ranges::gen

#include <range/v3/algorithm/shuffle.hpp>

Initial value:
= detail::get_random_engine())
{
auto mid = first;
if(mid == last)
return mid;
using D1 = iter_difference_t<I>;
using D2 =
std::uniform_int_distribution<D2> uid{};
using param_t = typename decltype(uid)::param_type;
while(++mid != last)
{
assert (( ( mid - first <= PTRDIFF_MAX ) ) && "mid - first <= PTRDIFF_MAX" );
if(auto const i = uid(gen, param_t{0, D2(mid - first)}))
ranges::iter_swap(mid - i, mid);
}
return mid;
}
template< typename Rng
constexpr _iter_swap_::fn iter_swap
>iter_swap::fn
Definition: access.hpp:256
typename detail::_cond< If >::template invoke< Then, Else > conditional_t
Select one type or another depending on a compile-time Boolean.
Definition: meta.hpp:1148

◆ last

CPP_TEMPLATE_AUX_0 S ranges::last

#include <range/v3/algorithm/adjacent_find.hpp>

Initial value:
{
if(first == middle)
{
return {first, first};
}
if(middle == last)
{
return {first, middle};
}
return detail::rotate_(first, middle, last, iterator_tag_of<I>{})
constexpr move_fn move
Definition: move.hpp:52

◆ middle

CPP_TEMPLATE_AUX_0 I ranges::middle

#include <range/v3/algorithm/inplace_merge.hpp>

Initial value:
{
return (*this)(begin(rng), std::move(middle), end(rng))
constexpr _begin_::fn begin
Definition: access.hpp:182
constexpr _end_::fn end
Definition: access.hpp:313

◆ op

Op ranges::op

#include <range/v3/algorithm/fold_left.hpp>

Initial value:
{
using U = std::decay_t<invoke_result_t<Op &, T, iter_reference_t<I>>>

◆ P

CPP_TEMPLATE_AUX_0 T const C P ranges::P

#include <range/v3/algorithm/heap_algorithm.hpp>

Initial value:
= identity > CPP_TEMPLATE_AUX_0 c( requires random_access_range<Rng> &&
indirect_strict_weak_order<C, projected<iterator_t<Rng>, P>> )ccconstexpr borrowed_iterator_t<Rng>
is_heap_until (Rng && rng, C pred = C{}, P proj = P{})
{
return detail::is_heap_until_n(
begin(rng), distance(rng), std::move(pred), std::move(proj));
}
namespace cpp20
{
using ranges::is_heap_until;
}
template< typename I
#define CPP_TEMPLATE_AUX_0(...)
INTERNAL ONLY.
Definition: concepts.hpp:243
CPP_TEMPLATE_AUX_0 c(requires random_access_iterator< I > &&sentinel_for< S, I > &&indirect_strict_weak_order< C, projected< I, P >>) ccconstexpr I is_heap_until(I first
function template is_heap_until
constexpr distance_fn distance
Definition: operations.hpp:561
requires(sizeof...(Ts) > 0) using lambda
For creating anonymous Invocables.

◆ P2

CPP_TEMPLATE_AUX_0 S1 I2 S2 O C P1 P2 ranges::P2

#include <range/v3/algorithm/set_algorithm.hpp>

Initial value:
= identity > CPP_TEMPLATE_AUX_0 c( requires input_range<Rng1> && input_range<Rng2> &&
indirect_strict_weak_order<C,
projected<iterator_t<Rng1>, P1>,
projected<iterator_t<Rng2>, P2>> )ccconstexpr bool includes (
Rng1 && rng1, Rng2 && rng2, C pred = C{}, P1 proj1 = P1{}, P2 proj2 = P2{})
{
return (*this)(begin(rng1),
end(rng1),
begin(rng2),
end(rng2),
std::move(pred),
std::move(proj1),
std::move(proj2));
}
namespace cpp20
{
using ranges::includes;
}
template<typename I1
CPP_TEMPLATE_AUX_0 c(requires range< Rng1 > &&range< Rng2 > &&mergeable< iterator_t< Rng1 >, iterator_t< Rng2 >, O, C, P1, P2 >) ccconstexpr set_union_result< borrowed_iterator_t< Rng1 >
This is an overloaded member function, provided for convenience. It differs from the above function o...

◆ proj

CPP_TEMPLATE_AUX_0 S V const C P ranges::proj

#include <range/v3/algorithm/adjacent_find.hpp>

Initial value:
= P{})
{
if(first == last)
return first;
auto inext = first;
for(; ++inext != last; first = inext)
if(invoke(pred, invoke(proj, *first), invoke(proj, *inext)))
return first;
return inext;
}
template< typename Rng
typename Fn::template invoke< Args... > invoke
Evaluate the invocable Fn with the arguments Args.
Definition: meta.hpp:541

◆ proj1

CPP_TEMPLATE_AUX_0 S1 I2 S2 Comp Proj1 ranges::proj1

#include <range/v3/algorithm/ends_with.hpp>

Initial value:
= P1{})
{
const auto drop = distance(begin0, end0) - distance(begin1, end1);
if(drop < 0)
return false;
return equal(next(std::move(begin0), drop),
std::move(end0),
std::move(begin1),
std::move(end1),
std::move(pred),
std::move(proj0),
std::move(proj1));
}
template< typename Rng0
drop_c< L, N::type::value > drop
Return a new meta::list by removing the first N elements from L.
Definition: meta.hpp:2037

◆ val

CPP_TEMPLATE_AUX_0 S V const & ranges::val

#include <range/v3/algorithm/binary_search.hpp>

Initial value:
{
for(; first != last; ++first)
*first = val