Iros
 
Loading...
Searching...
No Matches
cycle.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace di::container::view {
7namespace detail {
8 struct CycleFunction;
9
10 template<typename Con>
12
13 template<typename Con>
14 concept ViewCycle = requires(Con&& container) { CycleView { util::forward<Con>(container) }; };
15
17 template<concepts::ViewableContainer Con>
19 constexpr auto operator()(Con&& container) const -> concepts::View auto {
20 if constexpr (CustomCycle<Con>) {
21 return function::tag_invoke(*this, util::forward<Con>(container));
22 } else {
23 return CycleView { util::forward<Con>(container) };
24 }
25 }
26 };
27
28}
29
30constexpr inline auto cycle = detail::CycleFunction {};
31}
32
33namespace di {
34using view::cycle;
35}
Definition cycle_view.h:17
Definition tag_invoke.h:33
Definition view.h:10
Definition adjacent.h:9
Definition adjacent.h:8
constexpr auto cycle
Definition cycle.h:30
Definition sequence.h:12
constexpr tag_invoke_detail::TagInvokeFn tag_invoke
Definition tag_invoke.h:22
Definition zstring_parser.h:9