Adobe Source Libraries
1.49.0
A collection of C++ libraries.
Loading...
Searching...
No Matches
lexicographical_compare.hpp
Go to the documentation of this file.
1
/*
2
Copyright 2013 Adobe
3
Distributed under the Boost Software License, Version 1.0.
4
(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
*/
6
/**************************************************************************************************/
7
8
#ifndef ADOBE_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP
9
#define ADOBE_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP
10
11
#include <
adobe/config.hpp
>
12
13
#include <boost/range/begin.hpp>
14
#include <boost/range/end.hpp>
15
16
#include <algorithm>
17
#include <functional>
18
19
/**************************************************************************************************/
20
21
namespace
adobe
{
22
23
/**************************************************************************************************/
31
/**************************************************************************************************/
37
template
<
class
InputRange1,
class
InputRange2>
38
inline
bool
lexicographical_compare
(
const
InputRange1& range1,
const
InputRange2& range2) {
39
return
std::lexicographical_compare(boost::begin(range1), boost::end(range1),
40
boost::begin(range2), boost::end(range2));
41
}
42
48
template
<
class
InputIterator1,
class
InputIterator2,
class
Compare>
49
inline
bool
lexicographical_compare
(InputIterator1 first1, InputIterator1 last1,
50
InputIterator2 first2, InputIterator2 last2, Compare comp) {
51
return
std::lexicographical_compare(
52
first1, last1, first2, last2,
53
std::bind(comp, std::placeholders::_1, std::placeholders::_2));
54
}
55
61
template
<
class
InputRange1,
class
InputRange2,
class
Compare>
62
inline
bool
lexicographical_compare
(
const
InputRange1& range1,
const
InputRange2& range2,
63
Compare comp) {
64
return
adobe::lexicographical_compare
(boost::begin(range1), boost::end(range1),
65
boost::begin(range2), boost::end(range2), comp);
66
}
67
68
/**************************************************************************************************/
69
70
}
// namespace adobe
71
72
/**************************************************************************************************/
73
74
#endif
75
76
/**************************************************************************************************/
config.hpp
adobe::lexicographical_compare
bool lexicographical_compare(const InputRange1 &range1, const InputRange2 &range2)
lexicographical_compare implementation
Definition
lexicographical_compare.hpp:38
adobe
Definition
class_template.hpp:7
adobe
algorithm
lexicographical_compare.hpp
Generated by
1.14.0