12 struct CountedFunction;
14 template<
typename It,
typename Diff>
15 concept CustomCounted = concepts::TagInvocable<CountedFunction, It, Diff>;
17 template<
typename It,
typename Diff>
18 concept SpanCounted = concepts::ContiguousIterator<It>;
20 template<
typename It,
typename Diff>
21 concept ViewCounted = concepts::RandomAccessIterator<It>;
23 struct CountedFunction {
24 template<
typename Iter,
typename It = meta::Decay<Iter>,
25 concepts::ConvertibleTo<meta::IteratorSSizeType<It>> Diff>
26 constexpr auto operator()(Iter&& it, Diff&& n_in)
const -> concepts::View
auto {
28 auto n =
static_cast<SSizeType
>(n_in);
29 if constexpr (CustomCounted<It, Diff>) {
31 }
else if constexpr (SpanCounted<It, Diff>) {
33 }
else if constexpr (ViewCounted<It, Diff>) {
34 return View { it, it + n };
42constexpr inline auto counted = detail::CountedFunction {};
constexpr auto counted
Definition counted.h:42
View(Iter, Sent) -> View< Iter, Sent >
constexpr auto default_sentinel
Definition default_sentinel.h:6
constexpr auto to_address
Definition to_address.h:22
Span(Iter, SentOrSize) -> Span< meta::RemoveReference< meta::IteratorReference< Iter > > >
constexpr tag_invoke_detail::TagInvokeFn tag_invoke
Definition tag_invoke.h:22