Iros
 
Loading...
Searching...
No Matches
common.h
Go to the documentation of this file.
1#pragma once
2
8#include "di/util/forward.h"
9
10namespace di::container::view {
11namespace detail {
12 template<typename T>
14
15 template<typename T>
16 concept ViewCommon = requires(T&& container) { CommonView { util::forward<T>(container) }; };
17
19 template<concepts::ViewableContainer Con>
21 constexpr auto operator()(Con&& container) const -> concepts::View auto {
22 if constexpr (AllCommon<Con>) {
23 return all(util::forward<Con>(container));
24 } else {
25 return CommonView { util::forward<Con>(container) };
26 }
27 }
28 };
29}
30
31constexpr inline auto common = detail::CommonFunction {};
32}
33
34namespace di {
35using view::common;
36}
Definition common_view.h:11
Definition common_container.h:10
Definition view.h:10
Definition adjacent.h:9
Definition adjacent.h:8
constexpr auto common
Definition common.h:31
constexpr auto all
Definition all.h:35
Definition sequence.h:12
Definition zstring_parser.h:9