Core

## Description

Core range functionality.

## Classes

struct | ranges::v3::adaptor_base
struct | ranges::v3::adaptor_cursor< BaseIter, Adapt >
struct | ranges::v3::adaptor_sentinel< BaseSent, Adapt >
struct | ranges::v3::at_fn
| Checked indexed range access. More...
struct | ranges::v3::back_fn
struct | ranges::v3::bidirectional_iterator_tag
struct | ranges::v3::contiguous_iterator_tag
struct | ranges::v3::dangling< I >
| A wrapper for an iterator or a sentinel into a range that may no longer be valid. More...
struct | ranges::v3::distance_compare_fn
struct | ranges::v3::distance_fn
struct | ranges::v3::enumerate_fn
struct | ranges::v3::forward_iterator_tag
struct | ranges::v3::front_fn
struct | ranges::v3::get_unsafe_fn
struct | ranges::v3::getlines_fn
struct | ranges::v3::getlines_range
struct | ranges::v3::index_fn
| Unchecked indexed range access. More...
struct | ranges::v3::input_iterator_tag
struct | ranges::v3::istream_range< Val >
struct | ranges::v3::iterator_range< I, S >
struct | ranges::v3::make_iterator_range_fn
struct | ranges::v3::random_access_iterator_tag
struct | ranges::v3::range_cardinality< Rng, Void >
struct | ranges::v3::sanitize_fn
struct | ranges::v3::sized_iterator_range< I, S >
struct | ranges::v3::view_adaptor< Derived, BaseRng, Cardinality >
struct | ranges::v3::view_facade< Derived, Cardinality >
| A utility for constructing a view from a (derived) type that implements begin and end cursors. More...
struct | ranges::v3::view_interface< Derived, Cardinality >

## Typedefs

template<typename D >
using | ranges::v3::adaptor_cursor_t = adaptor_cursor< detail::adapted_iterator_t< D >, detail::begin_adaptor_t< D > >
template<typename D >
using | ranges::v3::adaptor_sentinel_t = meta::if_< meta::and_< Same< detail::adapted_iterator_t< D >, detail::adapted_sentinel_t< D > >, Same< detail::begin_adaptor_t< D >, detail::end_adaptor_t< D > >>, adaptor_cursor_t< D >, adaptor_sentinel< detail::adapted_sentinel_t< D >, detail::end_adaptor_t< D > >>
template<typename I >
using | ranges::v3::difference_type_t = concepts::WeaklyIncrementable::difference_t< I >
template<typename I >
using | ranges::v3::iter_common_reference_t = concepts::Readable::common_reference_t< I >
template<typename I >
using | ranges::v3::iterator_category_t = concepts::InputIterator::category_t< I >
template<typename Rng >
using | ranges::v3::iterator_t = concepts::Range::iterator_t< Rng >
template<typename Rng >
using | ranges::v3::range_category_t = concepts::InputRange::category_t< Rng >
template<typename Rng >
using | ranges::v3::range_common_iterator_t = common_iterator_t< iterator_t< Rng >, sentinel_t< Rng > >
template<typename Rng >
using | ranges::v3::range_common_reference_t = concepts::InputRange::common_reference_t< Rng >
template<typename Rng >
using | ranges::v3::range_difference_type_t = concepts::Range::difference_t< Rng >
template<typename Rng >
using | ranges::v3::range_reference_t = concepts::InputRange::reference_t< Rng >
template<typename Rng >
using | ranges::v3::range_rvalue_reference_t = concepts::InputRange::rvalue_reference_t< Rng >
template<typename Rng >
using | ranges::v3::range_size_type_t = meta::_t< std::make_unsigned< range_difference_type_t< Rng > >>
template<typename Rng >
using | ranges::v3::range_value_type_t = concepts::InputRange::value_t< Rng >
template<typename I >
using | ranges::v3::reference_t = concepts::Readable::reference_t< I >
template<typename I >
using | ranges::v3::rvalue_reference_t = concepts::Readable::rvalue_reference_t< I >
template<typename Rng >
using | ranges::v3::safe_iterator_t = meta::if_< std::is_lvalue_reference< Rng >, meta::if_< Range< Rng >, iterator_t< Rng > >, dangling< iterator_t< Rng > >>
template<typename Rng >
using | ranges::v3::sentinel_t = concepts::Range::sentinel_t< Rng >
template<typename I >
using | ranges::v3::size_type_t = meta::_t< std::make_unsigned< difference_type_t< I > >>
template<typename I >
using | ranges::v3::value_type_t = concepts::Readable::value_t< I >

## Functions

template<std::size_t N, typename I , typename S , requires = (N < 2)>
constexpr auto | ranges::v3::get (sized_iterator_range< I, S > const &p) -> decltype(ranges::get< N >(static_cast< iterator_range< I, S > const &>(p)))
| Tuple-like access for `sized_iterator_range`
template<typename Val >
istream_range< Val > | ranges::v3::istream (std::istream &sin)
template<template< typename... > class ContT>
detail::to_container_fn< meta::quote< ContT > > | ranges::v3::to_ ()
| For initializing a container of the specified type with the elements of an Range.
template<template< typename... > class ContT, typename Rng , typename Cont = meta::invoke<meta::quote<ContT>, range_value_type_t<Rng>>, requires = (Range<Rng>() && detail::ConvertibleToContainer<Rng, Cont>())>
Cont | ranges::v3::to_ (Rng &&rng)
template<template< typename... > class ContT, typename T , typename Cont = meta::invoke<meta::quote<ContT>, T>, requires = (detail::ConvertibleToContainer<std::initializer_list<T>, Cont>())>
Cont | ranges::v3::to_ (std::initializer_list< T > list)
template<typename Cont , typename Rng , requires = (Range<Rng>() && detail::ConvertibleToContainer<Rng, Cont>())>
Cont | ranges::v3::to_ (Rng &&rng)
template<typename Cont , typename T , requires = (detail::ConvertibleToContainer<std::initializer_list<T>, Cont>())>
Cont | ranges::v3::to_ (std::initializer_list< T > list)

## Variables

constexpr at_fn | ranges::v3::at {}
| Checked indexed range access. More...
constexpr back_fn | ranges::v3::back {}
constexpr _begin_::fn | ranges::v3::begin {}
constexpr _cbegin_::fn | ranges::v3::cbegin {}
constexpr _cend_::fn | ranges::v3::cend {}
constexpr _crbegin_::fn | ranges::v3::crbegin {}
constexpr _crend_::fn | ranges::v3::crend {}
constexpr distance_fn | ranges::v3::distance {}
constexpr distance_compare_fn | ranges::v3::distance_compare {}
constexpr _empty_::fn | ranges::v3::empty {}
constexpr _end_::fn | ranges::v3::end {}
constexpr enumerate_fn | ranges::v3::enumerate {}
constexpr front_fn | ranges::v3::front {}
constexpr get_unsafe_fn | ranges::v3::get_unsafe {}
constexpr getlines_fn | ranges::v3::getlines {}
constexpr index_fn | ranges::v3::index {}
| Unchecked indexed range access. More...
constexpr make_iterator_range_fn | ranges::v3::make_iterator_range {}
constexpr _rbegin_::fn | ranges::v3::rbegin {}
constexpr _rend_::fn | ranges::v3::rend {}
constexpr sanitize_fn | ranges::v3::sanitize {}
constexpr _size_::fn | ranges::v3::size {}
constexpr detail::to_container_fn< meta::quote< std::vector > > | ranges::v3::to_vector {}

## Function Documentation

## to_() [1/4]

template<template< typename... > class ContT, typename Rng , typename Cont = meta::invoke<meta::quote<ContT>, range_value_type_t<Rng>>, requires = (Range<Rng>() && detail::ConvertibleToContainer<Rng, Cont>())>

Cont ranges::v3::to_ | ( | Rng && | rng | ) |

`#include <range/v3/to_container.hpp>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## to_() [2/4]

template<template< typename... > class ContT, typename T , typename Cont = meta::invoke<meta::quote<ContT>, T>, requires = (detail::ConvertibleToContainer<std::initializer_list<T>, Cont>())>

Cont ranges::v3::to_ | ( | std::initializer_list< T > | list | ) |

`#include <range/v3/to_container.hpp>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## to_() [3/4]

template<typename Cont , typename Rng , requires = (Range<Rng>() && detail::ConvertibleToContainer<Rng, Cont>())>

Cont ranges::v3::to_ | ( | Rng && | rng | ) |

`#include <range/v3/to_container.hpp>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## to_() [4/4]

template<typename Cont , typename T , requires = (detail::ConvertibleToContainer<std::initializer_list<T>, Cont>())>

Cont ranges::v3::to_ | ( | std::initializer_list< T > | list | ) |

`#include <range/v3/to_container.hpp>`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## Variable Documentation

## at

constexpr at_fn ranges::v3::at {}

`#include <range/v3/at.hpp>`

Checked indexed range access.

See also
  `at_fn`

## back

constexpr back_fn ranges::v3::back {}

`#include <range/v3/back.hpp>`

See also
  `back_fn`

## begin

constexpr _begin_::fn ranges::v3::begin {}

`#include <range/v3/begin_end.hpp>`

Parameters

  r |

Returns
  `r`, if `r` is an array. Otherwise, `r.begin()` if that expression is well-formed and returns an Iterator. Otherwise, `begin(r)` if that expression returns an Iterator.

Referenced by ranges::v3::tokenize_view< Rng, Regex, SubMatchRange >::begin(), ranges::v3::tail_view< Rng >::begin(), ranges::v3::front_fn::operator()(), ranges::v3::at_fn::operator()(), ranges::v3::adjacent_find_fn::operator()(), ranges::v3::find_fn::operator()(), ranges::v3::is_sorted_until_fn::operator()(), ranges::v3::find_if_not_fn::operator()(), ranges::v3::find_if_fn::operator()(), ranges::v3::index_fn::operator()(), ranges::v3::binary_search_fn::operator()(), ranges::v3::unique_copy_fn::operator()(), ranges::v3::intersperse_view< Rng >::size(), ranges::v3::join_view< Rng, void >::size(), ranges::v3::bounded_view< Rng >::size(), and ranges::v3::join_view< Rng, ValRng >::size().

## cbegin

constexpr _cbegin_::fn ranges::v3::cbegin {}

`#include <range/v3/begin_end.hpp>`

Parameters

  r |

Returns
  The result of calling `ranges::begin` with a const-qualified reference to r.

## cend

constexpr _cend_::fn ranges::v3::cend {}

`#include <range/v3/begin_end.hpp>`

Parameters

  r |

Returns
  The result of calling `ranges::end` with a const-qualified reference to r.

## crbegin

constexpr _crbegin_::fn ranges::v3::crbegin {}

`#include <range/v3/begin_end.hpp>`

Parameters

  r |

Returns
  The result of calling `ranges::rbegin` with a const-qualified reference to r.

## crend

constexpr _crend_::fn ranges::v3::crend {}

`#include <range/v3/begin_end.hpp>`

Parameters

  r |

Returns
  The result of calling `ranges::rend` with a const-qualified reference to r.

## distance

constexpr distance_fn ranges::v3::distance {}

`#include <range/v3/distance.hpp>`

See also
  `distance_fn`

Referenced by ranges::v3::index_fn::operator()().

## distance_compare

constexpr distance_compare_fn ranges::v3::distance_compare {}

`#include <range/v3/distance.hpp>`

See also
  `distance_compare_fn`

## empty

constexpr _empty_::fn ranges::v3::empty {}

`#include <range/v3/empty.hpp>`

Returns
  true if and only if range contains no elements.

## end

constexpr _end_::fn ranges::v3::end {}

`#include <range/v3/begin_end.hpp>`

Parameters

  r |

Returns
  `r+size`(r), if `r` is an array. Otherwise, `r.end()` if that expression is well-formed and returns an Iterator. Otherwise, `end(r)` if that expression returns an Iterator.

Referenced by ranges::v3::view_interface< partial_sum_view< Rng, Fun >, Cardinality >::back(), ranges::v3::tokenize_view< Rng, Regex, SubMatchRange >::begin(), ranges::v3::tail_view< Rng >::begin(), ranges::v3::tail_view< Rng >::end(), ranges::v3::drop_view< Rng >::end(), ranges::v3::back_fn::operator()(), ranges::v3::adjacent_find_fn::operator()(), ranges::v3::is_sorted_fn::operator()(), ranges::v3::unique_fn::operator()(), ranges::v3::find_fn::operator()(), ranges::v3::find_if_fn::operator()(), ranges::v3::find_if_not_fn::operator()(), ranges::v3::binary_search_fn::operator()(), ranges::v3::unique_copy_fn::operator()(), ranges::v3::intersperse_view< Rng >::size(), ranges::v3::join_view< Rng, void >::size(), ranges::v3::bounded_view< Rng >::size(), and ranges::v3::join_view< Rng, ValRng >::size().

## enumerate

constexpr enumerate_fn ranges::v3::enumerate {}

`#include <range/v3/distance.hpp>`

See also
  `enumerate_fn`

## front

constexpr front_fn ranges::v3::front {}

`#include <range/v3/front.hpp>`

See also
  `front_fn`

## get_unsafe

constexpr get_unsafe_fn ranges::v3::get_unsafe {}

`#include <range/v3/utility/dangling.hpp>`

Returns
  `t.get_unsafe()` if `t` is an instance of `ranges::dangling`; otherwise, return `t`.

## index

constexpr index_fn ranges::v3::index {}

`#include <range/v3/index.hpp>`

Unchecked indexed range access.

See also
  `index_fn`

## make_iterator_range

constexpr make_iterator_range_fn ranges::v3::make_iterator_range {}

`#include <range/v3/iterator_range.hpp>`

See also
  `make_iterator_range_fn`

## rbegin

constexpr _rbegin_::fn ranges::v3::rbegin {}

`#include <range/v3/begin_end.hpp>`

Parameters

  r |

Returns
  `make_reverse_iterator(r+size(r))` if r is an array. Otherwise, `r.rbegin()` if that expression is well-formed and returns an 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 BidirectionalIterator.

## rend

constexpr _rend_::fn ranges::v3::rend {}

`#include <range/v3/begin_end.hpp>`

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<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 BidirectionalIterator.

## sanitize

constexpr sanitize_fn ranges::v3::sanitize {}

`#include <range/v3/utility/dangling.hpp>`

Returns
  the result of replacing all `ranges::dangling<T>` objects with `ranges::dangling<void>`, introspecting `std::pair` and `std::tuple` objects recursively.

## size

constexpr _size_::fn ranges::v3::size {}

`#include <range/v3/size.hpp>`

Returns
  The result of an unqualified call to `size` Not to spec per N4651: allow non-const size functions (See https://github.com/ericniebler/range-v3/issues/385)