Fixed ambiguity issues when compiling with C++0x support enabled.

[SVN r68155]
This commit is contained in:
Bryce Adelstein-Lelbach committed 2011-01-14 17:37:59 +00:00
1 parent e8060b3ef5
commit 0693db0847
2 files changed
+40 -39

No files matched your search

+7 -7
View File
@@ -16,14 +16,14 @@ namespace boost {
namespace detail {
template<class Iterator, class Comp>
inline Iterator is_sorted_until (Iterator first, Iterator last, Comp compare) {
inline Iterator is_sorted_until (Iterator first, Iterator last, Comp c) {
if (first == last)
return last;
Iterator it = first; ++it;
for (; it != last; first = it, ++it)
if (compare(*it, *first))
if (c(*it, *first))
return it;
return it;
@@ -34,19 +34,19 @@ inline Iterator is_sorted_until (Iterator first, Iterator last) {
typedef typename boost::detail::iterator_traits<Iterator>::value_type
value_type;
typedef std::less<value_type> compare;
typedef std::less<value_type> c;
return is_sorted_until(first, last, compare());
return ::boost::detail::is_sorted_until(first, last, c());
}
template<class Iterator, class Comp>
inline bool is_sorted (Iterator first, Iterator last, Comp compare) {
return is_sorted_until(first, last, compare) == last;
inline bool is_sorted (Iterator first, Iterator last, Comp c) {
return ::boost::detail::is_sorted_until(first, last, c) == last;
}
template<class Iterator>
inline bool is_sorted (Iterator first, Iterator last) {
return is_sorted_until(first, last) == last;
return ::boost::detail::is_sorted_until(first, last) == last;
}
} // detail