Skip to content

Search topics & cppreference

Search all study topics, concept maps, and 6,587 C++ and C reference pages.

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

Ranges
  • C++20
  • C++23
1 min readView on cppreference
NotebookLM
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.

Template parameters

R - a range type or a sized_range type

See also

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

Content from this page on cppreference.com, licensed under CC-BY-SA 3.0 and GFDL. Modified: restyled, site navigation removed, code windows added. Offline snapshot of 9 February 2025.