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

Description

Core range functionality.

Namespaces

 ranges::v3::CPOs
 

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::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 distance_fn ranges::v3::distance {}
 
constexpr distance_compare_fn ranges::v3::distance_compare {}
 
constexpr _empty_::fn ranges::v3::empty {}
 
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 sanitize_fn ranges::v3::sanitize {}
 
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

◆ distance

◆ distance_compare

constexpr distance_compare_fn ranges::v3::distance_compare {}

◆ empty

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

#include <range/v3/empty.hpp>

Returns
true if and only if range contains no elements.

◆ enumerate

constexpr enumerate_fn ranges::v3::enumerate {}
related

#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 {}

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