diff --git a/include/boost/intrusive/detail/algorithm.hpp b/include/boost/intrusive/detail/algorithm.hpp index d2421ff..f20c9d1 100644 --- a/include/boost/intrusive/detail/algorithm.hpp +++ b/include/boost/intrusive/detail/algorithm.hpp @@ -26,15 +26,15 @@ namespace intrusive { struct algo_pred_equal { - template - bool operator()(const T &x, const T &y) const + template + bool operator()(const T &x, const T2 &y) const { return x == y; } }; struct algo_pred_less { - template - bool operator()(const T &x, const T &y) const + template + bool operator()(const T &x, const T2 &y) const { return x < y; } }; @@ -49,10 +49,6 @@ bool algo_equal(InputIt1 first1, InputIt1 last1, InputIt2 first2, BinaryPredicat return true; } -template -bool algo_equal(InputIt1 first1, InputIt1 last1, InputIt2 first2) -{ return (algo_equal)(first1, last1, first2, algo_pred_equal()); } - template bool algo_equal(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, BinaryPredicate pred) { @@ -62,6 +58,10 @@ bool algo_equal(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2 return first1 == last1 && first2 == last2; } +template +bool algo_equal(InputIt1 first1, InputIt1 last1, InputIt2 first2) +{ return (algo_equal)(first1, last1, first2, algo_pred_equal()); } + template bool algo_equal(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2) { return (algo_equal)(first1, last1, first2, last2, algo_pred_equal()); }