Namespaces
Variants
Views
Actions

std::ranges::iterator_t, std::ranges::sentinel_t, std::ranges::range_difference_t, std::ranges::range_value_t, std::ranges::range_reference_t, std::ranges::range_rvalue_reference_t

From cppreference.com
< cpp‎ | ranges
 
 
 
Defined in header <ranges>
template <ranges::range T>
using iterator_t = decltype(ranges::begin(declval<T&>()));
(1) (since C++20)
template <ranges::range T>
using sentinel_t = decltype(ranges::end(declval<T&>()));
(2) (since C++20)
template <ranges::range T>
using range_difference_t = std::iter_difference_t<ranges::iterator_t<T>>;
(3) (since C++20)
template <ranges::range T>
using range_value_t = std::iter_value_t<ranges::iterator_t<T>>;
(4) (since C++20)
template <ranges::range T>
using range_reference_t = std::iter_reference_t<ranges::iterator_t<T>>;
(5) (since C++20)
template <ranges::range T>

using range_rvalue_reference_t =

    std::iter_rvalue_reference_t<ranges::iterator_t<T>>;
(6) (since C++20)
1) Used to obtain the iterator type of the type T.
2) Used to obtain the sentinel type of the type T.
3) Used to obtain the difference type of the iterator type of the type T.
4) Used to obtain the value type of the iterator type of the type T.
5) Used to obtain the reference type of the iterator type of the type T.
6) Used to obtain the rvalue_reference type of the iterator type of the type T.

[edit] Template parameters

T - a range type

[edit] See also

computes the associate types of an iterator
(alias template) [edit]