Iros
 
Loading...
Searching...
No Matches
all_of.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace di::container {
7namespace detail {
8 struct AllOfFunction {
9 template<concepts::InputIterator Iter, concepts::SentinelFor<Iter> Sent, typename Proj = function::Identity,
10 concepts::IndirectUnaryPredicate<meta::Projected<Iter, Proj>> Pred = function::AsBool>
11 constexpr auto operator()(Iter first, Sent last, Pred pred = {}, Proj proj = {}) const -> bool {
12 return container::find_if_not(util::move(first), last, util::ref(pred), util::ref(proj)) == last;
13 }
14
15 template<concepts::InputContainer Con, typename Proj = function::Identity,
18 constexpr auto operator()(Con&& container, Pred pred = {}, Proj proj = {}) const -> bool {
20 }
21 };
22}
23
24constexpr inline auto all_of = detail::AllOfFunction {};
25}
26
27namespace di {
29}
Definition indirect_unary_predicate.h:12
Definition input_container.h:8
Definition sequence.h:13
Definition sequence.h:12
constexpr auto find_if_not
Definition find_if_not.h:31
constexpr auto all_of
Definition all_of.h:24
constexpr auto end
Definition end.h:47
constexpr auto begin
Definition begin.h:44
constexpr auto ref
Definition reference_wrapper.h:98
Definition zstring_parser.h:9
constexpr auto proj
Definition proj.h:59
constexpr auto operator()(Iter first, Sent last, Pred pred={}, Proj proj={}) const -> bool
Definition all_of.h:11
constexpr auto operator()(Con &&container, Pred pred={}, Proj proj={}) const -> bool
Definition all_of.h:18
Definition as_bool.h:9
Definition identity.h:7