di 0.1.0
Loading...
Searching...
No Matches
adjacent.h
Go to the documentation of this file.
1#pragma once
2
7
9namespace detail {
10 template<size_t N>
11 struct AdjacentFunction : function::pipeline::EnablePipeline {
12 template<concepts::ViewableContainer Con>
13 constexpr auto operator()(Con&& container) const -> concepts::View auto {
14 if constexpr (N == 0) {
15 return empty<Tuple<>>;
16 } else {
17 return AdjacentView<meta::AsView<Con>, N>(util::forward<Con>(container));
18 }
19 }
20 };
21}
22
23template<size_t N>
24constexpr inline auto adjacent = detail::AdjacentFunction<N> {};
25}
26
27namespace di {
28using view::adjacent;
29}
Definition adjacent_view.h:20
Definition view.h:10
Definition adjacent.h:8
constexpr auto adjacent
Definition adjacent.h:24
constexpr auto empty
Definition empty.h:7
Definition sequence.h:12
Definition any_storable.h:9