Iros
 
Loading...
Searching...
No Matches
contains_subrange.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace di::container {
6namespace detail {
8 template<concepts::ForwardIterator It, concepts::SentinelFor<It> Sent, concepts::ForwardIterator Jt,
9 concepts::SentinelFor<Jt> Jent, typename Pred = function::Equal, typename Proj = function::Identity,
10 typename Jroj = function::Identity>
12 constexpr auto operator()(It it, Sent ed, Jt jt, Jent fd, Pred pred = {}, Proj proj = {}, Jroj jroj = {}) const
13 -> bool {
14 return jt == fd ||
15 !container::search(it, ed, jt, fd, util::ref(pred), util::ref(proj), util::ref(jroj)).empty();
16 }
17
18 template<concepts::InputContainer Con, concepts::InputContainer Jon, typename Pred = function::Equal,
19 typename Proj = function::Identity, typename Jroj = function::Identity>
20 requires(concepts::IndirectlyComparable<meta::ContainerIterator<Con>, meta::ContainerIterator<Jon>, Pred, Proj,
21 Jroj>)
22 constexpr auto operator()(Con&& con, Jon&& jon, Pred pred = {}, Proj proj = {}, Jroj jroj = {}) const -> bool {
23 return (*this)(container::begin(con), container::end(con), container::begin(jon), container::end(jon),
24 util::ref(pred), util::ref(proj), util::ref(jroj));
25 }
26 };
27}
28
30}
31
32namespace di {
34}
Definition indirectly_comparable.h:10
Definition sequence.h:13
Definition sequence.h:12
constexpr auto contains_subrange
Definition contains_subrange.h:29
constexpr auto search
Definition search.h:36
constexpr auto end
Definition end.h:47
constexpr auto begin
Definition begin.h:44
decltype(container::begin(util::declval< T & >())) ContainerIterator
Definition container_iterator.h:8
constexpr auto ref
Definition reference_wrapper.h:98
Definition zstring_parser.h:9
constexpr auto proj
Definition proj.h:59
Definition contains_subrange.h:7