VCCC  2024.05
VisualCamp Common C++ library
vccc::ranges Namespace Reference

Namespaces

 detail_iter_move
 
 detail_iter_swap
 
 detail_ranges_swap
 
 niebloid
 Niebloids.
 
 views
 

Classes

struct  in_found_result
 
struct  in_fun_result
 
struct  in_in_out_result
 
struct  in_in_result
 
struct  in_out_out_result
 
struct  in_out_result
 
struct  in_value_result
 
struct  min_max_result
 
struct  out_value_result
 
struct  equal_to
 
struct  greater
 
struct  greater_equal
 
struct  less
 
struct  less_equal
 
struct  not_equal_to
 
struct  range
 specifies that a type is a range, that is, it provides a begin iterator and an end sentinel More...
 
struct  borrowed_range
 
struct  sized_range
 specifies that a range knows its size in constant time More...
 
struct  view
 specifies that a range is a view, that is, it has constant time copy/move/assignment More...
 
struct  input_range
 specifies a range whose iterator type satisfies input_iterator More...
 
struct  output_range
 
struct  forward_range
 specifies a range whose iterator type satisfies forward_iterator More...
 
struct  bidirectional_range
 specifies a range whose iterator type satisfies bidirectional_iterator More...
 
struct  random_access_range
 specifies a range whose iterator type satisfies random_access_iterator More...
 
struct  contiguous_range
 specifies a range whose iterator type satisfies contiguous_iterator More...
 
struct  common_range
 
struct  viewable_range
 specifies the requirements for a range to be safely convertible to a view More...
 
struct  constant_range
 specifies the requirements for a range to be safely convertible to a view More...
 
class  view_interface
 helper class template for defining a view, using the curiously recurring template pattern More...
 
struct  borrowed_iterator
 
struct  borrowed_subrange
 
struct  const_iterator
 
struct  const_sentinel
 
struct  dangling
 a placeholder type indicating that an iterator or a subrange should not be returned since it would be dangling More...
 
struct  disabled_sized_range
 
struct  enable_borrowed_range
 
struct  enable_view
 The enable_view variable template is used to indicate whether a range is a view. More...
 
class  non_propagating_cache
 
class  owning_view
 a view with unique ownership of some range More...
 
struct  enable_borrowed_range< owning_view< T > >
 
class  range_adaptor
 
struct  range_adaptor_closure
 helper base class template for defining a range adaptor closure object More...
 
struct  is_range_adaptor_closure
 check if type satisfies range adaptor closure object More...
 
struct  range_const_reference
 
struct  range_difference
 
struct  range_key
 
struct  range_mapped
 
struct  range_reference
 
struct  range_rvalue_reference
 
struct  range_size
 
struct  range_value
 
class  ref_view
 a view of the elements of some other range More...
 
struct  enable_borrowed_range< ref_view< T > >
 
struct  sentinel
 
struct  sentinel< R, true, void_t< decltype(ranges::end(std::declval< R & >()))> >
 
struct  simple_view
 
struct  simple_view< R, false >
 
class  subrange
 
struct  enable_borrowed_range< subrange< I, S, K > >
 
struct  view_base
 Deriving from view_base enables range types to model view. More...
 
class  as_const_view
 
struct  enable_borrowed_range< as_const_view< T > >
 
class  basic_istream_view
 
class  cartesian_product_view
 
class  common_view
 Adapts a given view with different types for iterator/sentinel pair into a view that is also a common_range. A common_view always has the same iterator/sentinel type. More...
 
struct  enable_borrowed_range< common_view< V > >
 
struct  concat_view
 
struct  concat_with_view
 
class  drop_view
 
struct  enable_borrowed_range< drop_view< T > >
 
class  drop_while_view
 
struct  enable_borrowed_range< drop_while_view< T, Pred > >
 
class  elements_view
 
struct  enable_borrowed_range< elements_view< V, N > >
 
class  empty_view
 
struct  enable_borrowed_range< empty_view< T > >
 
class  enumerate_view
 
struct  enable_borrowed_range< enumerate_view< View > >
 
class  filter_view
 
class  iota_view
 
struct  enable_borrowed_range< iota_view< W, Bound > >
 
class  join_view
 
class  join_with_view
 
class  repeat_view
 
class  reverse_view
 A range adaptor that represents a view of underlying view with reversed order. More...
 
struct  enable_borrowed_range< reverse_view< T > >
 
class  single_view
 
class  split_view
 split_view takes a view and a delimiter, and splits the view into subranges on the delimiter. More...
 
class  take_view
 
struct  enable_borrowed_range< take_view< T > >
 
class  take_while_view
 
class  transform_view
 
class  zip_transform_view
 
class  zip_view
 
struct  enable_borrowed_range< span< T, Extent > >
 
struct  enable_view< span< T, Extent > >
 
struct  enable_borrowed_range< basic_string_view< CharT, Traits > >
 
struct  enable_view< basic_string_view< CharT, Traits > >
 

Typedefs

template<typename I , typename O >
using copy_result = in_out_result< I, O >
 
template<typename I , typename O >
using copy_if_result = in_out_result< I, O >
 
template<typename I , typename F >
using for_each_result = in_fun_result< I, F >
 
template<typename I , typename F >
using for_each_n_result = in_fun_result< I, F >
 
template<typename I1 , typename I2 >
using mismatch_result = in_in_result< I1, I2 >
 
template<class I1 , class I2 , class O >
using set_intersection_result = ranges::in_in_out_result< I1, I2, O >
 
template<class I1 , class I2 >
using swap_ranges_result = in_in_result< I1, I2 >
 
template<typename R >
using borrowed_iterator_t = typename borrowed_iterator< R >::type
 
template<typename R >
using borrowed_subrange_t = typename borrowed_subrange< R >::type
 
template<typename T >
using const_iterator_t = typename const_iterator< T >::type
 
template<typename R >
using const_sentinel_t = typename const_sentinel< R >::type
 
template<typename T >
using iterator_t = typename ranges::iterator< T >::type
 
template<typename R >
using range_const_reference_t = typename range_const_reference< R >::type
 Used to obtain the reference type of the iterator type of range type R. More...
 
template<typename R >
using range_difference_t = typename range_difference< R >::type
 Used to obtain the difference type of the iterator type of range type R. More...
 
template<typename R >
using range_key_t = typename range_key< R >::type
 
template<typename R >
using range_mapped_t = typename range_mapped< R >::type
 
template<typename R >
using range_reference_t = typename range_reference< R >::type
 Used to obtain the reference type of the iterator type of range type R. More...
 
template<typename R >
using range_rvalue_reference_t = typename range_rvalue_reference< R >::type
 Used to obtain the rvalue reference type of the iterator type of range type R. More...
 
template<typename R >
using range_size_t = typename range_size< R >::type
 Used to obtain the size type of the sized_range type R. More...
 
template<typename R >
using range_value_t = typename range_value< R >::type
 Used to obtain the value type of the iterator type of range type R. More...
 
template<typename R >
using sentinel_t = typename sentinel< R >::type
 
template<typename Val >
using istream_view = basic_istream_view< Val, char >
 
template<typename Val >
using wistream_view = basic_istream_view< Val, wchar_t >
 
template<typename R >
using keys_view = elements_view< R, 0 >
 An alias for ranges::elements_view<R, 0> More...
 
template<typename R >
using values_view = elements_view< R, 1 >
 An alias for ranges::elements_view<R, 0> More...
 

Enumerations

enum class  subrange_kind : bool { unsized , sized }
 

Functions

template<typename T >
constexpr auto as_const_pointer (const T *p) noexcept
 
template<typename R , std::enable_if_t< input_range< R >::value, int > = 0>
constexpr auto & possibly_const_range (R &r) noexcept
 
template<typename I , typename S , std::enable_if_t< conjunction< input_or_output_iterator< I >, sentinel_for< S, I >>::value, int > = 0>
constexpr subrange< I, S > make_subrange (I i, S s)
 
template<typename I , typename S , std::enable_if_t< conjunction< input_or_output_iterator< I >, sentinel_for< S, I >>::value, int > = 0>
constexpr subrange< I, S, subrange_kind::sizedmake_subrange (I i, S s, detail::make_unsigned_like_t< iter_difference_t< I >> n)
 
template<typename R , std::enable_if_t< borrowed_range< R >::value, int > = 0>
constexpr subrange< iterator_t< R >, sentinel_t< R >,(sized_range< R >::value||sized_sentinel_for< sentinel_t< R >, iterator_t< R >>::value) ? subrange_kind::sized :subrange_kind::unsizedmake_subrange (R &&r)
 
template<typename R , std::enable_if_t< borrowed_range< R >::value, int > = 0>
constexpr subrange< iterator_t< R >, sentinel_t< R >, subrange_kind::sizedmake_subrange (R &&r, detail::make_unsigned_like_t< range_difference_t< R >> n)
 
template<std::size_t N, typename I , typename S , subrange_kind K, std::enable_if_t<((N==0 &&copyable< I >::value)||N==1), int > = 0>
constexpr auto get (const subrange< I, S, K > &r)
 
template<std::size_t N, typename I , typename S , subrange_kind K, std::enable_if_t<(N< 2), int > = 0>
constexpr auto get (subrange< I, S, K > &&r)
 
template<typename C , typename R , typename... Args, std::enable_if_t< conjunction< input_range< R >, negation< view< C > >>::value, int > = 0>
constexpr std::enable_if_t<(detail::ranges_to_1_tag< C, R, Args... >::value > 0), C > to (R &&r, Args &&... args)
 Constructs an object of type C from the elements of r More...
 
template<template< typename... > class C, typename R , typename... Args, std::enable_if_t< input_range< R >::value, int > = 0>
constexpr detail::DEDUCE_EXPR_CATEGORY< C, R, Args... >::return_type to (R &&r, Args &&... args)
 Constructs an object of deduced type from the elements of r More...
 
template<typename C , typename... Args, std::enable_if_t< conjunction< detail::to_check_arg< Args... >, view< C >>::value==false, int > = 0>
constexpr detail::to_adaptor_closure< C, std::decay_t< Args >... > to (Args &&... args)
 Returns a perfect forwarding call wrapper that is also a RangeAdaptorClosureObject More...
 
template<template< typename... > class C, typename... Args, std::enable_if_t< detail::to_check_arg< Args... >::value, int > = 0>
constexpr detail::to_adaptor_closure< detail::template_type_holder< C >, std::decay_t< Args >... > to (Args &&... args)
 Returns a perfect forwarding call wrapper with deduced return type that is also a RangeAdaptorClosureObject More...
 
template<typename R , std::enable_if_t< viewable_range< R >::value, int > = 0>
constexpr common_view< views::all_t< R > > make_common_view (R &&r)
 
template<typename R >
constexpr drop_view< views::all_t< R > > make_drop_view (R &&r, range_difference_t< R > count)
 
template<typename R , typename Pred , std::enable_if_t< conjunction< has_typename_type< views::detail::all_t_impl< R >>, std::is_object< Pred >>::value, int > = 0>
constexpr auto make_drop_while_view (R &&r, Pred &&pred)
 
template<typename R >
constexpr reverse_view< views::all_t< R > > make_reverse_view (R &&r)
 
template<typename R , typename P >
constexpr auto make_split_view (R &&r, P &&pattern)
 
template<typename R >
constexpr take_view< views::all_t< R > > make_take_view (R &&r, range_difference_t< R > count)
 
template<typename R , typename F , std::enable_if_t< conjunction< input_range< views::all_t< R >>, copy_constructible< F >, std::is_object< F >, regular_invocable< F &, range_reference_t< views::all_t< R >>>>::value, int > = 0>
constexpr transform_view< views::all_t< R >, F > make_transform_view (R &&r, F f)
 

Variables

constexpr VCCC_INLINE_OR_STATIC detail::all_of_niebloid all_of {}
 
constexpr VCCC_INLINE_OR_STATIC detail::any_of_niebloid any_of {}
 
constexpr VCCC_INLINE_OR_STATIC detail::clamp_niebloid clamp {}
 clamps a value between a pair of boundary values More...
 
constexpr VCCC_INLINE_OR_STATIC detail::contains_niebloid contains {}
 
constexpr VCCC_INLINE_OR_STATIC detail::contains_subrange_niebloid contains_subrange {}
 
constexpr VCCC_INLINE_OR_STATIC detail::copy_niebloid copy {}
 
constexpr VCCC_INLINE_OR_STATIC detail::count_niebloid count {}
 
constexpr VCCC_INLINE_OR_STATIC detail::count_if_niebloid count_if {}
 
constexpr VCCC_INLINE_OR_STATIC detail::equal_niebloid equal {}
 Two ranges are considered equal if they have the same number of elements and every pair of corresponding projected elements satisfies pred More...
 
constexpr VCCC_INLINE_OR_STATIC detail::find_niebloid find {}
 
constexpr VCCC_INLINE_OR_STATIC detail::find_end_niebloid find_end {}
 
constexpr VCCC_INLINE_OR_STATIC detail::find_first_of_niebloid find_first_of {}
 
constexpr VCCC_INLINE_OR_STATIC detail::find_if_niebloid find_if {}
 
constexpr VCCC_INLINE_OR_STATIC detail::find_if_not_niebloid find_if_not {}
 
constexpr VCCC_INLINE_OR_STATIC detail::find_last_niebloid find_last {}
 
constexpr VCCC_INLINE_OR_STATIC detail::find_last_if_niebloid find_last_if {}
 
constexpr VCCC_INLINE_OR_STATIC detail::find_last_if_not_niebloid find_last_if_not {}
 
constexpr VCCC_INLINE_OR_STATIC detail::fold_left_niebloid fold_left {}
 
constexpr VCCC_INLINE_OR_STATIC detail::for_each_niebloid for_each {}
 
constexpr VCCC_INLINE_OR_STATIC detail::for_each_n_niebloid for_each_n {}
 
constexpr VCCC_INLINE_OR_STATIC detail::lexicographical_compare_niebloid lexicographical_compare {}
 returns true if one range is lexicographically less than another More...
 
constexpr VCCC_INLINE_OR_STATIC detail::make_heap_niebloid make_heap {}
 
constexpr VCCC_INLINE_OR_STATIC detail::max_niebloid max {}
 
constexpr VCCC_INLINE_OR_STATIC detail::max_element_niebloid max_element {}
 
constexpr VCCC_INLINE_OR_STATIC detail::min_niebloid min {}
 
constexpr VCCC_INLINE_OR_STATIC detail::min_element_niebloid min_element {}
 
constexpr VCCC_INLINE_OR_STATIC detail::mismatch_niebloid mismatch {}
 
constexpr VCCC_INLINE_OR_STATIC detail::none_of_niebloid none_of {}
 
constexpr VCCC_INLINE_OR_STATIC detail::pop_heap_niebloid pop_heap {}
 
constexpr VCCC_INLINE_OR_STATIC detail::search_niebloid search {}
 
constexpr VCCC_INLINE_OR_STATIC detail::set_intersection_niebloid set_intersection {}
 
constexpr VCCC_INLINE_OR_STATIC detail::sort_niebloid sort {}
 
constexpr VCCC_INLINE_OR_STATIC detail::sort_heap_niebloid sort_heap {}
 
constexpr VCCC_INLINE_OR_STATIC detail::swap_ranges_niebloid swap_ranges {}
 

Typedef Documentation

◆ copy_if_result

◆ copy_result

using copy_result = in_out_result<I, O>

Function Documentation

◆ to() [1/2]

constexpr detail::to_adaptor_closure<detail::template_type_holder<C>, std::decay_t<Args>...> vccc::ranges::to ( Args &&...  args)
constexpr

◆ to() [2/2]

constexpr detail::DEDUCE_EXPR_CATEGORY<C, R, Args...>::return_type vccc::ranges::to ( R &&  r,
Args &&...  args 
)
constexpr