16#ifndef RANGES_V3_ALGORITHM_IS_SORTED_HPP
17#define RANGES_V3_ALGORITHM_IS_SORTED_HPP
27#include <range/v3/utility/static_const.hpp>
29#include <range/v3/detail/prologue.hpp>
35 RANGES_FUNC_BEGIN(is_sorted)
48 template(
typename I,
typename S,
typename R =
less,
typename P =
identity)(
51 constexpr bool RANGES_FUNC(is_sorted)(I
first, S last, R rel = R{}, P proj = P{})
53 return is_sorted_until(
54 std::move(first), last, std::move(rel), std::move(proj)) == last;
58 template(
typename Rng,
typename R =
less,
typename P =
identity)(
61 constexpr bool RANGES_FUNC(is_sorted)(Rng && rng, R rel = R{}, P proj = P{})
63 return (*
this)(begin(rng), end(rng), std::move(rel), std::move(proj));
66 RANGES_FUNC_END(is_sorted)
70 using ranges::is_sorted;
75#include <range/v3/detail/epilogue.hpp>
The forward_iterator concept.
The forward_range concept.
The indirect_strict_weak_order concept.
The sentinel_for concept.
decltype(begin(declval(Rng &))) iterator_t
Definition access.hpp:698
front< Pair > first
Retrieve the first element of the pair Pair.
Definition meta.hpp:2251
Definition adjacent_find.hpp:67
Definition identity.hpp:25
Definition comparisons.hpp:50