SysTutorials

Linux Manual Pages › Section 3

stdrangessizedrangestdrangesdisable_sized_range(3)

std::ranges::SizedRange,std::ranges::disable_sized_range - std::ranges::SizedRange,std::ranges::disable_sized_range

Synopsis

Defined in header <ranges>
template< class T >
concept SizedRange = Range<T> &&
! disable_sized_range<std::remove_cvref_t<T>> &&   (1)
requires(T& t) {
    ranges::size(t);
};
template<class>                                    (2)
inline constexpr bool disable_sized_range = false;
  1. The SizedRange concept specifies the requirements of a Range type that knows its size in constant time with the size function. Formally, given an lvalue t of type std::remove_reference_t<T>, T models SizedRange only if
  1. disable_sized_range exists to allows use of range types that satisfy but do not in fact model SizedRange.