13 #ifndef RANGES_V3_VIEW_COUNTED_HPP
14 #define RANGES_V3_VIEW_COUNTED_HPP
24 #include <range/v3/utility/static_const.hpp>
28 #include <range/v3/detail/prologue.hpp>
40 iter_difference_t<I> n_;
48 RANGES_EXPECT(0 <= n_);
50 counted_iterator<I> begin()
const
52 return make_counted_iterator(it_, n_);
60 return static_cast<detail::iter_size_t<I>
>(n_);
65 RANGES_INLINE_VAR constexpr
bool enable_borrowed_range<counted_view<I>> =
true;
67 #if RANGES_CXX_DEDUCTION_GUIDES >= RANGES_CXX_DEDUCTION_GUIDES_17
78 requires input_or_output_iterator<I> AND (!random_access_iterator<I>))
80 operator()(I it, iter_difference_t<I> n)
const
82 return {make_counted_iterator(std::move(it), n), default_sentinel};
85 requires random_access_iterator<I>)
86 subrange<I> operator()(I it, iter_difference_t<I> n)
const
95 requires input_or_output_iterator<I> AND (!random_access_iterator<I>))
98 return {std::move(it), n};
100 template(
typename I)(
101 requires random_access_iterator<I>)
102 subrange<I> operator()(I it, iter_difference_t<I> n)
const
123 #include <range/v3/detail/epilogue.hpp>
124 #include <range/v3/detail/satisfy_boost_range.hpp>
RANGES_INLINE_VARIABLE(detail::to_container_fn< detail::from_range< std::vector >>, to_vector) template< template< typename... > class ContT > auto to(RANGES_HIDDEN_DETAIL(detail
For initializing a container of the specified type with the elements of an Range.
Definition: conversion.hpp:399
Definition: counted.hpp:36
Definition: default_sentinel.hpp:26
Definition: subrange.hpp:196
Definition: interface.hpp:129
Definition: counted.hpp:93
Definition: counted.hpp:76