Core range functionality. More...
Modules | |
Range Concepts | |
Range concepts. | |
Classes | |
struct | ranges::at_fn |
Checked indexed range access. More... | |
struct | ranges::back_fn |
struct | ranges::dangling |
A placeholder for an iterator or a sentinel into a range that may no longer be valid. More... | |
struct | ranges::front_fn |
struct | ranges::index_fn |
Unchecked indexed range access. More... | |
struct | ranges::range_cardinality< Rng, Void > |
Typedefs | |
template<typename I , typename S > | |
using | ranges::common_iterator_t = meta::conditional_t< std::is_same< I, S >::value, I, detail::common_iterator_impl_t< I, S > > |
template<typename Rng > | |
using | ranges::range_common_iterator_t = common_iterator_t< iterator_t< Rng >, sentinel_t< Rng > > |
template<typename Rng > | |
using | ranges::range_common_reference_t = iter_common_reference_t< iterator_t< Rng > > |
template<typename Rng > | |
using | ranges::range_difference_t = iter_difference_t< iterator_t< Rng > > |
template<typename Rng > | |
using | ranges::range_reference_t = iter_reference_t< iterator_t< Rng > > |
template<typename Rng > | |
using | ranges::range_rvalue_reference_t = iter_rvalue_reference_t< iterator_t< Rng > > |
template<typename Rng > | |
using | ranges::range_size_t = decltype(ranges::size(std::declval< Rng & >())) |
template<typename Rng > | |
using | ranges::range_value_t = iter_value_t< iterator_t< Rng > > |
Functions | |
template<typename Cont , typename Rng > | |
CPP_TEMPLATE_AUX_0 | ranges::a (requires input_range< Rng > &&(!detail::convertible_to_cont< Rng, Cont >) &&detail::convertible_to_cont_cont< Rng, Cont >) aaauto to(Rng &&rng) -> Cont |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<template< typename... > class ContT, typename Rng , typename C = meta::invoke<detail::from_range<ContT>, Rng>> | |
CPP_TEMPLATE_AUX_0 | ranges::a (requires range< Rng > &&detail::convertible_to_cont< Rng, C >) aaauto to(Rng &&rng) -> C |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename Cont , typename Rng > | |
CPP_TEMPLATE_AUX_0 | ranges::a (requires range< Rng > &&detail::convertible_to_cont< Rng, Cont >) aaauto to(Rng &&rng) -> Cont |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<template< typename... > class ContT> | |
auto | ranges::to () -> detail::to_container_fn< detail::from_range< ContT >> |
For initializing a container of the specified type with the elements of an Range. More... | |
Variables | |
constexpr at_fn | ranges::at {} |
Checked indexed range access. More... | |
constexpr back_fn | ranges::back {} |
constexpr _begin_::fn | ranges::begin {} |
constexpr _cbegin_::fn | ranges::cbegin {} |
template<typename T > | |
concept | ranges::ccontainer |
\concept container More... | |
constexpr _cdata_::fn | ranges::cdata {} |
constexpr _cend_::fn | ranges::cend {} |
concept | ranges::container_ = |
template<typename T > | |
ranges::CPP_TEMPLATE_AUX_1 | |
\concept container_ More... | |
constexpr _crbegin_::fn | ranges::crbegin {} |
constexpr _crend_::fn | ranges::crend {} |
template<typename Rng , typename I , typename S > | |
concept | ranges::eerasable_range |
\concept erasable_range More... | |
constexpr _empty_::fn | ranges::empty {} |
constexpr _end_::fn | ranges::end {} |
template<typename Rng , typename I , typename S > | |
concept | ranges::erasable_range_ = requires( Rng && rng, I first, S last ) { ranges::erase((Rng &&) rng, first, last) ; } |
\concept erasable_range_ More... | |
constexpr front_fn | ranges::front {} |
constexpr index_fn | ranges::index {} |
Unchecked indexed range access. More... | |
template<typename T > | |
concept | ranges::llvalue_container_like |
\concept lvalue_container_like More... | |
concept | ranges::lvalue_container_like_ = |
constexpr _rbegin_::fn | ranges::rbegin {} |
constexpr _rend_::fn | ranges::rend {} |
template<typename C > | |
concept | ranges::reservable_ = requires( C & c, C const & cc ) { c.reserve(ranges::size(c)), cc.capacity(), cc.max_size(), concepts::requires_<same_as<decltype(cc.capacity()), decltype(ranges::size(c))>>, concepts::requires_<same_as<decltype(cc.max_size()), decltype(ranges::size(c))>> ; } |
\concept reservable_ More... | |
template<typename C , typename I > | |
concept | ranges::reservable_with_assign_ = requires( C & c, I i ) { c.assign(i, i) ; } |
\concept reservable_with_assign_ More... | |
template<typename C > | |
concept | ranges::rrandom_access_reservable |
\concept random_access_reservable More... | |
template<typename C > | |
concept | ranges::rreservable |
\concept reservable More... | |
template<typename C , typename I > | |
concept | ranges::rreservable_with_assign |
\concept reservable_with_assign More... | |
constexpr _size_::fn | ranges::size {} |
template<typename T > | |
concept | ranges::ssemi_container |
\concept semi_container More... | |
constexpr detail::to_container_fn< detail::from_range< std::vector > > | ranges::to_vector {} |
Core range functionality.
auto ranges::to | ( | ) | -> detail::to_container_fn<detail::from_range<ContT>> |
#include <range/v3/range/conversion.hpp>
For initializing a container of the specified type with the elements of an Range.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
constexpr |
|
constexpr |
#include <range/v3/range/operations.hpp>
back_fn
|
constexpr |
#include <range/v3/range/access.hpp>
r |
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. Referenced by ranges::view_interface< Derived, Cardinality >::c().
|
constexpr |
#include <range/v3/range/access.hpp>
r |
ranges::begin
with a const-qualified reference to r. concept ranges::ccontainer |
#include <range/v3/action/concepts.hpp>
\concept container
The container
concept
|
constexpr |
#include <range/v3/range/primitives.hpp>
r |
ranges::data
with a const-qualified (lvalue or rvalue) reference to r
.
|
constexpr |
#include <range/v3/range/access.hpp>
r |
ranges::end
with a const-qualified reference to r. ranges::CPP_TEMPLATE_AUX_1 |
#include <range/v3/action/concepts.hpp>
\concept container_
\concept invocable_view_closure_
\concept simple_view_impl_
\concept exclusive_scan_constraints_
\concept cartesian_produce_view_can_bidi_
\concept cartesian_produce_view_can_random_
\concept cartesian_produce_view_can_distance_
\concept cartesian_produce_view_can_size_
\concept uniform_random_bit_generator_
\concept sized_range_
\concept common_range_
\concept contiguous_range_
\concept random_access_range_
\concept bidirectional_range_
\concept forward_range_
\concept input_range_
\concept output_range_
\concept partial_sum_constraints_
\concept indirect_semigroup_
\concept inner_product_constraints_
\concept differenceable_
\concept projected_indirect_strict_weak_order_
\concept projected_indirect_relation_
\concept indirectly_copyable_storable_
\concept indirectly_copyable_
\concept indirectly_movable_storable_
\concept indirectly_movable_
\concept indirect_strict_weak_order_
\concept indirect_relation_
\concept indirect_binary_predicate_impl_
\concept indirect_unary_predicate_
\concept indirectly_regular_unary_invocable_
\concept contiguous_iterator_
\concept with_category_
\concept sized_sentinel_for_
\concept input_or_output_iterator_
\concept weakly_incrementable_
\concept readable_
\concept lvalue_container_like_
The container_
concept std::vector
is a container, std::array
is not
The lvalue_container_like_
concept
The readable_
concept
The weakly_incrementable_
concept
The input_or_output_iterator_
concept
The sized_sentinel_for_
concept
The with_category_
concept
The contiguous_iterator_
concept
The indirectly_regular_unary_invocable_
concept
The indirect_unary_predicate_
concept
The indirect_binary_predicate_impl_
concept
The indirect_relation_
concept
The indirect_strict_weak_order_
concept
The indirectly_movable_
concept
The indirectly_movable_storable_
concept
The indirectly_copyable_
concept
The indirectly_copyable_storable_
concept
The projected_indirect_relation_
concept
The projected_indirect_strict_weak_order_
concept
The differenceable_
concept
The inner_product_constraints_
concept
The indirect_semigroup_
concept
The partial_sum_constraints_
concept
The output_range_
concept
The input_range_
concept
The forward_range_
concept
The bidirectional_range_
concept
The random_access_range_
concept
The contiguous_range_
concept
The common_range_
concept
The sized_range_
concept
The uniform_random_bit_generator_
concept
The cartesian_produce_view_can_size_
concept
The cartesian_produce_view_can_distance_
concept
The cartesian_produce_view_can_random_
concept
The cartesian_produce_view_can_bidi_
concept
The exclusive_scan_constraints_
concept
The simple_view_impl_
concept
The invocable_view_closure_
concept
|
constexpr |
#include <range/v3/range/access.hpp>
r |
ranges::rbegin
with a const-qualified reference to r.
|
constexpr |
#include <range/v3/range/access.hpp>
r |
ranges::rend
with a const-qualified reference to r. concept ranges::eerasable_range |
#include <range/v3/action/erase.hpp>
\concept erasable_range
The erasable_range
concept
|
constexpr |
#include <range/v3/range/primitives.hpp>
|
constexpr |
#include <range/v3/range/access.hpp>
r |
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. Referenced by ranges::view_interface< Derived, Cardinality >::c().
concept ranges::erasable_range_ = requires( Rng && rng, I first, S last ) { ranges::erase((Rng &&) rng, first, last) ; } |
|
constexpr |
#include <range/v3/range/operations.hpp>
front_fn
|
constexpr |
concept ranges::llvalue_container_like |
#include <range/v3/action/concepts.hpp>
\concept lvalue_container_like
The lvalue_container_like
concept
|
constexpr |
#include <range/v3/range/access.hpp>
r |
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
.
|
constexpr |
#include <range/v3/range/access.hpp>
r |
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
. concept ranges::reservable_ = requires( C & c, C const & cc ) { c.reserve(ranges::size(c)), cc.capacity(), cc.max_size(), concepts::requires_<same_as<decltype(cc.capacity()), decltype(ranges::size(c))>>, concepts::requires_<same_as<decltype(cc.max_size()), decltype(ranges::size(c))>> ; } |
concept ranges::reservable_with_assign_ = requires( C & c, I i ) { c.assign(i, i) ; } |
#include <range/v3/action/concepts.hpp>
\concept reservable_with_assign_
The reservable_with_assign_
concept
concept ranges::rrandom_access_reservable |
#include <range/v3/action/concepts.hpp>
\concept random_access_reservable
The random_access_reservable
concept
concept ranges::rreservable |
#include <range/v3/action/concepts.hpp>
\concept reservable
The reservable
concept
concept ranges::rreservable_with_assign |
#include <range/v3/action/concepts.hpp>
\concept reservable_with_assign
The reservable_with_assign
concept
|
constexpr |
#include <range/v3/range/primitives.hpp>
E
of type T
, ranges::size(E)
is equivalent to:+extent_v<T>
if T
is an array type.+E.size()
if it is a valid expression and its type I
models integral
and disable_sized_range<std::remove_cvref_t<T>>
is false.+size(E)
if it is a valid expression and its type I
models integral
with overload resolution performed in a context that includes the declaration: ranges::size
, and disable_sized_range<std::remove_cvref_t<T>>
is false.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 integral
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>
.ranges::size(E)
is ill-formed. concept ranges::ssemi_container |
#include <range/v3/action/concepts.hpp>
\concept semi_container
The semi_container
concept std::array
is a semi_container
, native arrays are not.