5 #ifndef VCCC_RANGES_VIEWS_COUNTED_HPP_
6 #define VCCC_RANGES_VIEWS_COUNTED_HPP_
32 using vccc::detail::return_category;
33 using vccc::detail::tag_1;
34 using vccc::detail::tag_2;
35 using vccc::detail::tag_else;
41 template<
typename T,
typename DiffType>
42 struct check<T, DiffType, false> : std::false_type {};
45 using tag = vccc::detail::conditional_tag<
49 template<
typename D,
typename I,
typename DiffType>
50 constexpr
auto call(I&& it, DiffType&&
count, tag_1 )
const {
52 using T = std::remove_reference_t<iter_reference_t<Address>>;
55 static_cast<std::size_t
>(
static_cast<D
>(std::forward<DiffType>(
count))) );
58 template<
typename D,
typename I,
typename DiffType>
59 constexpr
auto call(I&& it, DiffType&&
count, tag_2 )
const {
63 template<
typename D,
typename I,
typename DiffType>
64 constexpr
auto call(I&& it, DiffType&&
count, tag_else)
const {
68 std::forward<DiffType>(
count)),
74 template<
typename I,
typename DiffType, std::enable_if_t<
75 check<std::decay_t<I>, DiffType&&>
::value,
int> = 0>
77 using T = std::decay_t<I>;
79 return call<D>(std::forward<I>(it), std::forward<DiffType>(
count), tag<T>{});
Definition: counted_iterator.hpp:71
a non-owning view over a contiguous sequence of objects
Definition: span.hpp:118
constexpr VCCC_INLINE_OR_STATIC detail::count_niebloid count
Definition: count.hpp:58
constexpr VCCC_INLINE_OR_STATIC default_sentinel_t default_sentinel
Definition: default_sentinel_t.hpp:25
constexpr T * to_address(T *p) noexcept
Definition: to_address.hpp:37
typename iter_difference< T >::type iter_difference_t
Computes the difference type of T
Definition: iter_difference_t.hpp:49
constexpr VCCC_INLINE_OR_STATIC detail::counted_niebloid counted
creates a subrange from an iterator and a count
Definition: counted.hpp:101
constexpr subrange< I, S > make_subrange(I i, S s)
Definition: subrange.hpp:275
#define VCCC_INLINE_OR_STATIC
Definition: inline_or_static.hpp:9
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35
specifies that a random_access_iterator is a contiguous iterator, referring to elements that are cont...
Definition: contiguous_iterator.hpp:88
Models std::convertible_to
Definition: convertible_to.hpp:38
specifies that a bidirectional_iterator is a random-access iterator, supporting advancement in consta...
Definition: random_access_iterator.hpp:120
Definition: counted.hpp:37
constexpr auto operator()(I &&it, DiffType &&count) const
Definition: counted.hpp:76