Horizon
Loading...
Searching...
No Matches
ranges::cpp20 Namespace Reference

Classes

struct  equal_to
struct  greater
struct  greater_equal
struct  less
struct  less_equal
struct  not_equal_to
struct  identity
struct  invoke_result
struct  common_iterator
struct  default_sentinel_t
struct  back_insert_iterator
struct  front_insert_iterator
struct  insert_iterator
struct  move_iterator
struct  move_sentinel
struct  ostreambuf_iterator
struct  unreachable_sentinel_t
struct  view_base
struct  dangling
 A placeholder for an iterator or a sentinel into a range that may no longer be valid. More...

Typedefs

template<typename T, typename Char = char, typename Traits = std::char_traits<Char>>
using ostream_iterator = ranges::ostream_iterator<T, Char, Traits>
template<typename T>
using incrementable_traits = ranges::incrementable_traits<T>
template<typename T>
using indirectly_readable_traits = ranges::indirectly_readable_traits<T>
using drop_while_view = ranges::drop_while_view<Rng, Pred>
using filter_view = ranges::filter_view<V, Pred>
using view_interface = ranges::view_interface<Derived, ranges::unknown>
template<typename Val>
using basic_istream_view = ::ranges::istream_view<Val>
using take_while_view = ranges::take_while_view<Rng, Pred>
template<typename I, typename O>
using copy_result
template<typename I, typename O>
using copy_backward_result
template<typename I, typename O>
using copy_if_result
template<typename I, typename O>
using copy_n_result
template<typename I, typename F>
using for_each_result
template<typename O, typename F>
using generate_result
template<typename O, typename F>
using generate_n_result
template<typename I0, typename I1, typename O>
using merge_result
template<typename I>
using minmax_element_result
template<typename I1, typename I2>
using mismatch_result
template<typename I, typename O>
using move_result
template<typename I, typename O>
using move_backward_result
template<typename I, typename O0, typename O1>
using partition_copy_result
template<typename I, typename O>
using remove_copy_result
template<typename I, typename O>
using remove_copy_if_result
template<typename I, typename O>
using replace_copy_result
template<typename I, typename O>
using replace_copy_if_result
template<typename I, typename O>
using reverse_copy_result
template<typename I, typename O>
using rotate_copy_result
template<typename I, typename O>
using sample_result
template<typename I1, typename I2, typename O>
using set_union_result
template<typename I, typename O>
using set_difference_result
template<typename I1, typename I2, typename O>
using set_symmetric_difference_result
template<typename I1, typename I2>
using swap_ranges_result
template<typename I1, typename I2, typename O>
using binary_transform_result
template<typename I, typename O>
using unary_transform_result
template<typename I, typename O>
using unique_copy_result
template<typename Fun, typename... Args>
using invoke_result_t
template<typename R>
using iter_reference_t
template<typename R>
using iter_value_t
template<typename Fun, typename... Is>
using indirect_result_t
template<typename I, typename Proj>
using projected
template<typename I>
using reverse_iterator
template<typename I>
using iter_common_reference_t
template<typename T>
using iter_difference_t
template<typename R>
using iter_reference_t
template<typename I>
using iter_rvalue_reference_t
template<typename R>
using iter_value_t
template<typename Rng>
using iterator_t
template<typename Rng>
using sentinel_t
template<typename Rng>
using borrowed_iterator_t
template<typename Rng>
using borrowed_iterator_t
template<typename Rng>
using borrowed_iterator_t
template<typename Rng>
using range_difference_t
template<typename Rng>
using range_reference_t
template<typename Rng>
using range_rvalue_reference_t
template<typename Rng>
using range_value_t

Enumerations

enum class  subrange_kind

Functions

 template (typename Rng)() using common_view = ranges::drop_view<Rng>
 template (typename Rng, typename Pred)(AND input_range< Rng > AND indirect_unary_predicate< Pred
 template (typename T)() using empty_view = ranges::single_view<T>
 template (typename V, typename Pred)(AND indirect_unary_predicate< Pred
 template (typename Derived)(AND same_as< Derived
 template (typename Rng, typename Pattern)(AND forward_range< Pattern > AND view_< Rng > AND view_< Pattern > AND indirectly_comparable< iterator_t< Rng >
 template (typename I, typename S=I, subrange_kind K=static_cast< subrange_kind >(detail::is_sized_sentinel_< S, I >()))(AND sentinel_for< S
AND (K==subrange_kind::sized||!sized_sentinel_for< S, I >)) using subrange
 template (typename Rng, typename Pred)(AND input_range< Rng > AND predicate< Pred &
I AND indirect_relation< C, projected< I, P > > constexpr I RANGES_FUNC adjacent_find (I first, S last, C pred=C{}, P proj=P{})
I AND indirect_relation< Pred, projected< I, Proj > > constexpr I RANGES_FUNC adjacent_remove_if (I first, S last, Pred pred={}, Proj proj={})
I AND indirect_strict_weak_order< C, V const *, projected< I, P > > constexpr bool RANGES_FUNC binary_search (I first, S last, V const &val, C pred=C{}, P proj=P{})
I AND weakly_incrementable< O > AND indirectly_copyable< I, O > constexpr copy_result< I, O > RANGES_FUNC copy (I first, S last, O out)
I AND bidirectional_iterator< O > AND indirectly_copyable< I, O > constexpr copy_backward_result< I, O > RANGES_FUNC copy_backward (I first, S end_, O out)
I AND weakly_incrementable< O > AND indirect_unary_predicate< F, projected< I, P > > AND indirectly_copyable< I, O > constexpr copy_if_result< I, O > RANGES_FUNC copy_if (I first, S last, O out, F pred, P proj=P{})
O constexpr copy_n_result< I, O > RANGES_FUNC copy_n (I first, iter_difference_t< I > n, O out)
I AND indirect_strict_weak_order< C, V const *, projected< I, P > > constexpr subrange< I > RANGES_FUNC equal_range (I first, S last, V const &val, C pred=C{}, P proj=P{})
O constexpr O RANGES_FUNC fill (O first, S last, V const &val)
I1 AND forward_iterator< I2 > AND sentinel_for< S2, I2 > AND indirect_relation< R, projected< I1, P >, I2 > constexpr subrange< I1 > RANGES_FUNC find_end (I1 begin1, S1 end1, I2 begin2, S2 end2, R pred=R{}, P proj=P{})
I0 AND forward_iterator< I1 > AND sentinel_for< S1, I1 > AND indirect_relation< R, projected< I0, P0 >, projected< I1, P1 > > constexpr I0 RANGES_FUNC find_first_of (I0 begin0, S0 end0, I1 begin1, S1 end1, R pred=R{}, P0 proj0=P0{}, P1 proj1=P1{})
I AND indirect_unary_predicate< F, projected< I, P > > constexpr I RANGES_FUNC find_if_not (I first, S last, F pred, P proj=P{})
I AND indirectly_unary_invocable< F, projected< I, P > > constexpr for_each_result< I, F > RANGES_FUNC for_each (I first, S last, F fun, P proj=P{})
projected< I, P > constexpr I RANGES_FUNC for_each_n (I first, iter_difference_t< I > n, F fun, P proj=P{})
invoke_result_t< F & > AND sentinel_for< S, O > constexpr generate_result< O, F > RANGES_FUNC generate (O first, S last, F fun)
invoke_result_t< F & > constexpr generate_n_result< O, F > RANGES_FUNC generate_n (O first, iter_difference_t< O > n, F fun)
I AND indirect_strict_weak_order< C, projected< I, P > > constexpr I RANGES_FUNC is_heap_until (I first, S last, C pred=C{}, P proj=P{})
I AND indirect_strict_weak_order< C, projected< I, P > > constexpr bool RANGES_FUNC is_heap (I first, S last, C pred=C{}, P proj=P{})
I AND sortable< I, C, P > constexpr I RANGES_FUNC push_heap (I first, S last, C pred=C{}, P proj=P{})
I AND sortable< I, C, P > constexpr I RANGES_FUNC pop_heap (I first, S last, C pred=C{}, P proj=P{})
I AND sortable< I, C, P > constexpr I RANGES_FUNC make_heap (I first, S last, C pred=C{}, P proj=P{})
I AND sortable< I, C, P > constexpr I RANGES_FUNC sort_heap (I first, S last, C pred=C{}, P proj=P{})
P I RANGES_FUNC inplace_merge (I first, I middle, S last, C pred=C{}, P proj=P{})
I AND indirect_unary_predicate< C, projected< I, P > > constexpr bool RANGES_FUNC is_partitioned (I first, S last, C pred, P proj=P{})
I AND indirect_strict_weak_order< R, projected< I, P > > constexpr bool RANGES_FUNC is_sorted (I first, S last, R rel=R{}, P proj=P{})
I AND indirect_strict_weak_order< R, projected< I, P > > constexpr I RANGES_FUNC is_sorted_until (I first, S last, R pred=R{}, P proj=P{})
I0 AND input_iterator< I1 > AND sentinel_for< S1, I1 > AND indirect_strict_weak_order< C, projected< I0, P0 >, projected< I1, P1 > > constexpr bool RANGES_FUNC lexicographical_compare (I0 begin0, S0 end0, I1 begin1, S1 end1, C pred=C{}, P0 proj0=P0{}, P1 proj1=P1{})
I AND indirect_strict_weak_order< C, V const *, projected< I, P > > constexpr I RANGES_FUNC lower_bound (I first, S last, V const &val, C pred=C{}, P proj=P{})
I AND indirect_strict_weak_order< C, projected< I, P > > constexpr I RANGES_FUNC max_element (I first, S last, C pred=C{}, P proj=P{})
I1 AND mergeable< I0, I1, O, C, P0, P1 > constexpr merge_result< I0, I1, O > RANGES_FUNC merge (I0 begin0, S0 end0, I1 begin1, S1 end1, O out, C pred=C{}, P0 proj0=P0{}, P1 proj1=P1{})
I AND indirect_strict_weak_order< C, projected< I, P > > constexpr I RANGES_FUNC min_element (I first, S last, C pred=C{}, P proj=P{})
I AND indirect_strict_weak_order< C, projected< I, P > > constexpr minmax_element_result< I > RANGES_FUNC minmax_element (I first, S last, C pred=C{}, P proj=P{})
I1 AND input_iterator< I2 > AND indirect_relation< C, projected< I1, P1 >, projected< I2, P2 > > I2 RANGES_FUNC mismatch (I1 begin1, S1 end1, I2 begin2, C pred=C{}, P1 proj1=P1{}, P2 proj2=P2{})
I AND weakly_incrementable< O > AND indirectly_movable< I, O > constexpr move_result< I, O > RANGES_FUNC move (I first, S last, O out)
I AND bidirectional_iterator< O > AND indirectly_movable< I, O > constexpr move_backward_result< I, O > RANGES_FUNC move_backward (I first, S end_, O out)
P constexpr I RANGES_FUNC nth_element (I first, I nth, S end_, C pred=C{}, P proj=P{})
I AND random_access_iterator< O > AND sentinel_for< SO, O > AND indirectly_copyable< I, O > AND sortable< O, C, PO > AND indirect_strict_weak_order< C, projected< I, PI >, projected< O, PO > > constexpr O RANGES_FUNC partial_sort_copy (I first, SI last, O out_begin, SO out_end, C pred=C{}, PI in_proj=PI{}, PO out_proj=PO{})
I AND weakly_incrementable< O0 > AND weakly_incrementable< O1 > AND indirectly_copyable< I, O0 > AND indirectly_copyable< I, O1 > AND indirect_unary_predicate< C, projected< I, P > > constexpr partition_copy_result< I, O0, O1 > RANGES_FUNC partition_copy (I first, S last, O0 o0, O1 o1, C pred, P proj=P{})
I AND indirect_unary_predicate< C, projected< I, P > > constexpr I RANGES_FUNC partition_point (I first, S last, C pred, P proj=P{})
I AND indirect_relation< equal_to, projected< I, P >, T const * > constexpr I RANGES_FUNC remove (I first, S last, T const &val, P proj=P{})
I AND weakly_incrementable< O > AND indirect_relation< equal_to, projected< I, P >, T const * > AND indirectly_copyable< I, O > constexpr remove_copy_result< I, O > RANGES_FUNC remove_copy (I first, S last, O out, T const &val, P proj=P{})
I AND weakly_incrementable< O > AND indirect_unary_predicate< C, projected< I, P > > AND indirectly_copyable< I, O > constexpr remove_copy_if_result< I, O > RANGES_FUNC remove_copy_if (I first, S last, O out, C pred, P proj=P{})
I AND indirect_unary_predicate< C, projected< I, P > > constexpr I RANGES_FUNC remove_if (I first, S last, C pred, P proj=P{})
I AND output_iterator< O, T2 const & > AND indirectly_copyable< I, O > AND indirect_relation< equal_to, projected< I, P >, T1 const * > constexpr replace_copy_result< I, O > RANGES_FUNC replace_copy (I first, S last, O out, T1 const &old_value, T2 const &new_value, P proj={})
I AND output_iterator< O, T const & > AND indirect_unary_predicate< C, projected< I, P > > AND indirectly_copyable< I, O > constexpr replace_copy_if_result< I, O > RANGES_FUNC replace_copy_if (I first, S last, O out, C pred, T const &new_value, P proj={})
I AND weakly_incrementable< O > AND indirectly_copyable< I, O > constexpr reverse_copy_result< I, O > RANGES_FUNC reverse_copy (I first, S end_, O out)
I constexpr subrange< I > RANGES_FUNC rotate (I first, I middle, S last)
I AND weakly_incrementable< O > AND indirectly_copyable< I, O > constexpr rotate_copy_result< I, O > RANGES_FUNC rotate_copy (I first, I middle, S last, O out)
I1 AND forward_iterator< I2 > AND sentinel_for< S2, I2 > AND indirectly_comparable< I1, I2, C, P1, P2 > constexpr subrange< I1 > RANGES_FUNC search (I1 begin1, S1 end1, I2 begin2, S2 end2, C pred=C{}, P1 proj1=P1{}, P2 proj2=P2{})
I AND indirectly_comparable< I, V const *, C, P > constexpr subrange< I > RANGES_FUNC search_n (I first, S last, iter_difference_t< I > cnt, V const &val, C pred=C{}, P proj=P{})
I1 AND input_iterator< I2 > AND sentinel_for< S2, I2 > AND indirect_strict_weak_order< C, projected< I1, P1 >, projected< I2, P2 > > constexpr bool RANGES_FUNC includes (I1 begin1, S1 end1, I2 begin2, S2 end2, C pred=C{}, P1 proj1=P1{}, P2 proj2=P2{})
I2 AND mergeable< I1, I2, O, C, P1, P2 > constexpr set_union_result< I1, I2, O > RANGES_FUNC set_union (I1 begin1, S1 end1, I2 begin2, S2 end2, O out, C pred=C{}, P1 proj1=P1{}, P2 proj2=P2{})
I2 AND mergeable< I1, I2, O, C, P1, P2 > constexpr O RANGES_FUNC set_intersection (I1 begin1, S1 end1, I2 begin2, S2 end2, O out, C pred=C{}, P1 proj1=P1{}, P2 proj2=P2{})
I2 AND mergeable< I1, I2, O, C, P1, P2 > constexpr set_difference_result< I1, O > RANGES_FUNC set_difference (I1 begin1, S1 end1, I2 begin2, S2 end2, O out, C pred=C{}, P1 proj1=P1{}, P2 proj2=P2{})
I2 AND mergeable< I1, I2, O, C, P1, P2 > constexpr set_symmetric_difference_result< I1, I2, O > RANGES_FUNC set_symmetric_difference (I1 begin1, S1 end1, I2 begin2, S2 end2, O out, C pred=C{}, P1 proj1=P1{}, P2 proj2=P2{})
I AND permutable< I > AND uniform_random_bit_generator< std::remove_reference_t< Gen > > AND convertible_to< invoke_result_t< Gen & >, iter_difference_t< I > > I RANGES_FUNC shuffle (I const first, S const last, Gen &&gen=detail::get_random_engine())
I AND indirect_unary_predicate< C, projected< I, P > > AND permutable< I > I RANGES_FUNC stable_partition (I first, S last, C pred, P proj=P{})
I1 AND input_iterator< I2 > AND indirectly_swappable< I1, I2 > constexpr swap_ranges_result< I1, I2 > RANGES_FUNC swap_ranges (I1 begin1, S1 end1, I2 begin2)
I AND indirect_relation< C, projected< I, P > > AND weakly_incrementable< O > AND indirectly_copyable< I, O > O RANGES_FUNC unique_copy (I first, S last, O out, C pred=C{}, P proj=P{})
I AND indirect_strict_weak_order< C, V const *, projected< I, P > > constexpr I RANGES_FUNC upper_bound (I first, S last, V const &val, C pred=C{}, P proj=P{})

Variables

 iterator_t< Pattern >
ranges::equal_to AND (forward_range< Rng >||ranges::detail::tiny_range< Pattern >)) using split_view
template<typename Fn, typename... Args>
RANGES_INLINE_VAR constexpr bool is_invocable_v
template<typename Fn, typename... Args>
RANGES_INLINE_VAR constexpr bool is_nothrow_invocable_v
template<typename I1, typename I2, typename Out, typename C = less, typename P1 = identity, typename P2 = identity>
CPP_concept mergeable
template<typename S, typename I>
RANGES_INLINE_VAR constexpr bool disable_sized_sentinel
template<typename R>
RANGES_INLINE_VAR constexpr bool enable_borrowed_range
template<typename T>
RANGES_INLINE_VAR constexpr bool enable_view
 Rng
template<typename T>
RANGES_INLINE_VAR constexpr bool disable_sized_range

Detailed Description

See also
not_fn_fn
inserter_fn
move_into_fn
distance_compare_fn
Returns
For a given expression E of type T, ranges::size(E) is equivalent to:
  • +extent_v<T> if T is an array type.
  • Otherwise, +E.size() if it is a valid expression and its type I models Integer sequence and disable_sized_range<std::remove_cvref_t<T>> is false.
  • Otherwise, +size(E) if it is a valid expression and its type I models Integer sequence with overload resolution performed in a context that includes the declaration:
    template<class T> void size(T&&) = delete;
    and does not include a declaration of ranges::size, and disable_sized_range<std::remove_cvref_t<T>> is false.
  • Otherwise, static_cast<U>(ranges::end(E) - ranges::begin(E)) where U is std::make_unsigned_t<iter_difference_t<iterator_t<T>>> if iter_difference_t<iterator_t<T>> satisfies Integer sequence and iter_difference_t<iterator_t<T>> otherwise; except that E is evaluated once, if it is a valid expression and the types I and S of ranges::begin(E) and ranges::end(E) model sized_sentinel_for<S, I> and forward_iterator<I>.
  • Otherwise, ranges::size(E) is ill-formed.
Parameters
r
Returns
The result of calling ranges::data with a const-qualified (lvalue or rvalue) reference to r.
true if and only if range contains no elements.

Typedef Documentation

◆ iterator_t

template<typename Rng>
using ranges::iterator_t
Parameters
r
Returns
r, if r is an array. Otherwise, r.begin() if that expression is well-formed and returns an input_or_output_iterator. Otherwise, begin(r) if that expression returns an input_or_output_iterator.
Parameters
r
Returns
r+size(r), if r is an array. Otherwise, r.end() if that expression is well-formed and returns an input_or_output_iterator. Otherwise, end(r) if that expression returns an input_or_output_iterator.
Parameters
r
Returns
The result of calling ranges::begin with a const-qualified reference to r.
Parameters
r
Returns
The result of calling ranges::end with a const-qualified reference to r.
Parameters
r
Returns
make_reverse_iterator(r + ranges::size(r)) if r is an array. Otherwise, r.rbegin() if that expression is well-formed and returns an input_or_output_iterator. Otherwise, make_reverse_iterator(ranges::end(r)) if ranges::begin(r) and ranges::end(r) are both well-formed and have the same type that satisfies bidirectional_iterator.
Parameters
r
Returns
make_reverse_iterator(r) if r is an array. Otherwise, r.rend() if that expression is well-formed and returns a type that satisfies sentinel_for<S, I> where I is the type of ranges::rbegin(r). Otherwise, make_reverse_iterator(ranges::begin(r)) if ranges::begin(r) and ranges::end(r) are both well-formed and have the same type that satisfies bidirectional_iterator.
Parameters
r
Returns
The result of calling ranges::rbegin with a const-qualified reference to r.
Parameters
r
Returns
The result of calling ranges::rend with a const-qualified reference to r.

Variable Documentation

◆ AND

ranges::equal_to ranges::cpp20::AND(forward_range< Rng >||ranges::detail::tiny_range< Pattern >)) using split_view ( forward_range< Rng >||ranges::detail::tiny_range< Pattern > )
Initial value: