Core range functionality.
More...
|
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 > > |
|
|
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...
|
|
template<template< typename... > class ContT, typename Rng , typename C = meta::invoke<detail::from_range<ContT>, Rng>>
requires range<Rng> && detail::convertible_to_cont<Rng, C> |
auto | ranges::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 >
requires range<Rng> && detail::convertible_to_cont<Rng, Cont> |
auto | ranges::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.
|
|
Core range functionality.
◆ to()
template<template< typename... > class ContT>
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.
References ranges::to().
Referenced by ranges::to().
◆ at
constexpr at_fn ranges::at {} |
|
constexpr |
◆ back
◆ begin
constexpr _begin_::fn ranges::begin {} |
|
constexpr |
◆ cbegin
constexpr _cbegin_::fn ranges::cbegin {} |
|
constexpr |
#include <range/v3/range/access.hpp>
- Parameters
-
- Returns
- The result of calling
ranges::begin
with a const-qualified reference to r.
◆ cdata
constexpr _cdata_::fn ranges::cdata {} |
|
constexpr |
#include <range/v3/range/primitives.hpp>
- Parameters
-
- Returns
- The result of calling
ranges::data
with a const-qualified (lvalue or rvalue) reference to r
.
◆ cend
constexpr _cend_::fn ranges::cend {} |
|
constexpr |
#include <range/v3/range/access.hpp>
- Parameters
-
- Returns
- The result of calling
ranges::end
with a const-qualified reference to r.
◆ crbegin
constexpr _crbegin_::fn ranges::crbegin {} |
|
constexpr |
#include <range/v3/range/access.hpp>
- Parameters
-
- Returns
- The result of calling
ranges::rbegin
with a const-qualified reference to r.
◆ crend
constexpr _crend_::fn ranges::crend {} |
|
constexpr |
#include <range/v3/range/access.hpp>
- Parameters
-
- Returns
- The result of calling
ranges::rend
with a const-qualified reference to r.
◆ empty
constexpr _empty_::fn ranges::empty {} |
|
constexpr |
◆ end
constexpr _end_::fn ranges::end {} |
|
constexpr |
◆ front
◆ index
◆ rbegin
constexpr _rbegin_::fn ranges::rbegin {} |
|
constexpr |
#include <range/v3/range/access.hpp>
- Parameters
-
- 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
.
◆ rend
constexpr _rend_::fn ranges::rend {} |
|
constexpr |
#include <range/v3/range/access.hpp>
- Parameters
-
- 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
.
◆ size
constexpr _size_::fn ranges::size {} |
|
constexpr |
#include <range/v3/range/primitives.hpp>
- 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 integral
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 integral
with overload resolution performed in a context that includes the declaration: template<
class T>
void size(T&&) =
delete;
meta::size_t< L::size()> size
An integral constant wrapper that is the size of the meta::list L.
Definition: meta.hpp:1696
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 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>
.
- Otherwise,
ranges::size(E)
is ill-formed.