Iros
 
Loading...
Searching...
No Matches
is_sorted.h
Go to the documentation of this file.
1#pragma once
2
8#include "di/util/move.h"
10
11namespace di::container {
12namespace detail {
14 template<concepts::ForwardIterator Iter, concepts::SentinelFor<Iter> Sent, typename Proj = function::Identity,
15 concepts::IndirectStrictWeakOrder<meta::Projected<Iter, Proj>> Comp = function::Compare>
16 constexpr auto operator()(Iter first, Sent last, Comp comp = {}, Proj proj = {}) const -> bool {
17 return container::is_sorted_until(util::move(first), last, util::ref(comp), util::ref(proj)) == last;
18 }
19
20 template<concepts::ForwardContainer Con, typename Proj = function::Identity,
23 constexpr auto operator()(Con&& container, Comp comp = {}, Proj proj = {}) const -> bool {
25 }
26 };
27}
28
29constexpr inline auto is_sorted = detail::IsSortedFunction {};
30}
31
32namespace di {
34}
Definition forward_container.h:8
Definition indirect_strict_weak_order.h:12
Definition sequence.h:13
Definition sequence.h:12
constexpr auto is_sorted_until
Definition is_sorted_until.h:40
constexpr auto is_sorted
Definition is_sorted.h:29
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()(Con &&container, Comp comp={}, Proj proj={}) const -> bool
Definition is_sorted.h:23
constexpr auto operator()(Iter first, Sent last, Comp comp={}, Proj proj={}) const -> bool
Definition is_sorted.h:16
Definition compare.h:8
Definition identity.h:7