Adobe Source Libraries
1.49.0
A collection of C++ libraries.
Loading...
Searching...
No Matches
equal.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_EQUAL_HPP
9
#define ADOBE_ALGORITHM_EQUAL_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
/**************************************************************************************************/
35
template
<
class
InputIterator1,
class
InputIterator2,
class
BinaryPredicate>
36
inline
bool
equal
(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2,
37
BinaryPredicate pred) {
38
return
std::equal(first1, last1, first2,
39
std::bind(pred, std::placeholders::_1, std::placeholders::_2));
40
}
41
45
template
<
class
InputRange1,
class
InputIterator2>
46
inline
bool
equal
(
const
InputRange1& range1, InputIterator2 first2) {
47
return
std::equal(boost::begin(range1), boost::end(range1), first2);
48
}
49
53
template
<
class
InputRange1,
class
InputIterator2,
class
BinaryPredicate>
54
inline
bool
equal
(
const
InputRange1& range1, InputIterator2 first2, BinaryPredicate pred) {
55
return
adobe::equal
(boost::begin(range1), boost::end(range1), first2, pred);
56
}
57
58
/**************************************************************************************************/
59
60
}
// namespace adobe
61
62
/**************************************************************************************************/
63
64
#endif
65
66
/**************************************************************************************************/
config.hpp
adobe::equal
bool equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, BinaryPredicate pred)
Definition
equal.hpp:36
adobe
Definition
class_template.hpp:7
adobe
algorithm
equal.hpp
Generated by
1.14.0