14 #ifndef STXXL_COMMON_IS_SORTED_HEADER
15 #define STXXL_COMMON_IS_SORTED_HEADER
22 template <
class _ForwardIter>
25 if (__first == __last)
28 _ForwardIter __next = __first;
29 for (++__next; __next != __last; __first = __next, ++__next) {
30 if (*__next < *__first)
37 template <
class _ForwardIter,
class _StrictWeakOrdering>
39 _StrictWeakOrdering __comp)
41 if (__first == __last)
44 _ForwardIter __next = __first;
45 for (++__next; __next != __last; __first = __next, ++__next) {
46 if (__comp(*__next, *__first))
53 template <
class _ForwardIter>
54 bool is_sorted(_ForwardIter __first, _ForwardIter __last)
59 template <
class _ForwardIter,
class _StrictWeakOrdering>
60 bool is_sorted(_ForwardIter __first, _ForwardIter __last,
61 _StrictWeakOrdering __comp)
68 #endif // !STXXL_COMMON_IS_SORTED_HEADER
bool is_sorted(_ForwardIter __first, _ForwardIter __last)
#define STXXL_BEGIN_NAMESPACE
bool is_sorted_helper(_ForwardIter __first, _ForwardIter __last)
#define STXXL_END_NAMESPACE