Namespaces
Variants
Views
Actions

std::ranges::range_size_t, std::ranges::range_difference_t, std::ranges::range_value_t

From cppreference.com
< cpp‎ | ranges
 
 
Ranges library
Range adaptors
 
Defined in header <ranges>
template< ranges::sized_range R >
using range_size_t = decltype(ranges::size(std::declval<R&>()));
(1) (since C++20)
template< ranges::range R >
using range_difference_t = std::iter_difference_t<ranges::iterator_t<R>>;
(2) (since C++20)
template< ranges::range R >
using range_value_t = std::iter_value_t<ranges::iterator_t<R>>;
(3) (since C++20)
1) Used to obtain the size type of the sized_range type R.
2) Used to obtain the difference type of the iterator type of range type R.
3) Used to obtain the value type of the iterator type of range type R.

[edit] Template parameters

R - a range type or a sized_range type

[edit] See also

computes the associated types of an iterator
(alias template)[edit]
obtains iterator and sentinel types of a range
(alias template)[edit]
obtains reference types of a range
(alias template)[edit]