Iros
 
Loading...
Searching...
No Matches
find_last_not_of.h
Go to the documentation of this file.
1#pragma once
2
5#include "di/function/equal.h"
6
7namespace di::container {
8namespace detail {
10 template<concepts::InputIterator It, concepts::SentinelFor<It> Sent, concepts::ForwardIterator Jt,
11 concepts::SentinelFor<Jt> Jent, typename Pred = function::Equal, typename Proj = function::Identity,
12 typename Jroj = function::Identity>
14 constexpr auto operator()(It it, Sent sent, Jt jt, Jent jent, Pred pred = {}, Proj proj = {},
15 Jroj jroj = {}) const -> View<It> {
17 util::move(it), sent,
18 [&]<typename T>(T&& value) {
19 return container::all_of(
20 jt, jent,
21 [&]<typename U>(U&& other) {
22 return !function::invoke(pred, value, other);
23 },
24 util::ref(jroj));
25 },
27 }
28
29 template<concepts::InputContainer Con, concepts::ForwardContainer Needles, typename Pred = function::Equal,
30 typename Proj1 = function::Identity, typename Proj2 = function::Identity>
31 requires(concepts::IndirectlyComparable<meta::ContainerIterator<Con>, meta::ContainerIterator<Needles>, Pred,
32 Proj1, Proj2>)
33 constexpr auto operator()(Con&& container, Needles&& needles, Pred pred = {}, Proj1 proj1 = {},
34 Proj2 proj2 = {}) const -> meta::BorrowedView<Con> {
36 container::end(needles), util::ref(pred), util::ref(proj1), util::ref(proj2));
37 }
38 };
39}
40
42}
43
44namespace di {
46}
Definition view.h:35
Definition indirectly_comparable.h:10
Definition sequence.h:13
Definition sequence.h:12
constexpr auto find_last_not_of
Definition find_last_not_of.h:41
constexpr auto all_of
Definition all_of.h:24
constexpr auto end
Definition end.h:47
constexpr auto find_last_if
Definition find_last_if.h:37
constexpr auto begin
Definition begin.h:44
constexpr auto invoke
Definition invoke.h:100
Conditional< concepts::BorrowedContainer< Con >, container::View< ContainerIterator< Con > >, container::Dangling > BorrowedView
Definition borrowed_view.h:12
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 find_last_not_of.h:9