@@ -26,15 +26,15 @@ namespace intrusive {
26
26
27
27
struct algo_pred_equal
28
28
{
29
- template <class T >
30
- bool operator ()(const T &x, const T &y) const
29
+ template <class T , class T2 >
30
+ bool operator ()(const T &x, const T2 &y) const
31
31
{ return x == y; }
32
32
};
33
33
34
34
struct algo_pred_less
35
35
{
36
- template <class T >
37
- bool operator ()(const T &x, const T &y) const
36
+ template <class T , class T2 >
37
+ bool operator ()(const T &x, const T2 &y) const
38
38
{ return x < y; }
39
39
};
40
40
@@ -49,10 +49,6 @@ bool algo_equal(InputIt1 first1, InputIt1 last1, InputIt2 first2, BinaryPredicat
49
49
return true ;
50
50
}
51
51
52
- template <class InputIt1 , class InputIt2 >
53
- bool algo_equal (InputIt1 first1, InputIt1 last1, InputIt2 first2)
54
- { return (algo_equal)(first1, last1, first2, algo_pred_equal ()); }
55
-
56
52
template <class InputIt1 , class InputIt2 , class BinaryPredicate >
57
53
bool algo_equal (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, BinaryPredicate pred)
58
54
{
@@ -62,6 +58,10 @@ bool algo_equal(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2
62
58
return first1 == last1 && first2 == last2;
63
59
}
64
60
61
+ template <class InputIt1 , class InputIt2 >
62
+ bool algo_equal (InputIt1 first1, InputIt1 last1, InputIt2 first2)
63
+ { return (algo_equal)(first1, last1, first2, algo_pred_equal ()); }
64
+
65
65
template <class InputIt1 , class InputIt2 >
66
66
bool algo_equal (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2)
67
67
{ return (algo_equal)(first1, last1, first2, last2, algo_pred_equal ()); }
0 commit comments