forked from boostorg/algorithm
Fix (even more) test failures in Boost.Algorithm
[SVN r77076]
This commit is contained in:
@ -97,13 +97,12 @@ bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1,
|
|||||||
/// We will use the standard one if it is available,
|
/// We will use the standard one if it is available,
|
||||||
/// otherwise we have our own implementation.
|
/// otherwise we have our own implementation.
|
||||||
template< class ForwardIterator1, class ForwardIterator2 >
|
template< class ForwardIterator1, class ForwardIterator2 >
|
||||||
bool is_permutation ( ForwardIterator1 first, ForwardIterator1 last,
|
bool is_permutation ( ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 first2 )
|
||||||
ForwardIterator2 first2 )
|
|
||||||
{
|
{
|
||||||
// How should I deal with the idea that ForwardIterator1::value_type
|
// How should I deal with the idea that ForwardIterator1::value_type
|
||||||
// and ForwardIterator2::value_type could be different? Define my own comparison predicate?
|
// and ForwardIterator2::value_type could be different? Define my own comparison predicate?
|
||||||
return boost::algorithm::is_permutation ( first, last, first2,
|
return boost::algorithm::is_permutation ( first, last, first2,
|
||||||
std::equal_to<typename ForwardIterator1::value_type> ());
|
std::equal_to<typename std::iterator_traits<ForwardIterator1>::value_type> ());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -168,7 +168,7 @@ using std::is_sorted; // Section 25.4.1.5
|
|||||||
bool is_increasing ( ForwardIterator first, ForwardIterator last )
|
bool is_increasing ( ForwardIterator first, ForwardIterator last )
|
||||||
{
|
{
|
||||||
typedef typename std::iterator_traits<ForwardIterator>::value_type value_type;
|
typedef typename std::iterator_traits<ForwardIterator>::value_type value_type;
|
||||||
return is_sorted (first, last, std::less_equal<value_type>());
|
return boost::algorithm::is_sorted (first, last, std::less_equal<value_type>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ partition_copy ( InputIterator first, InputIterator last,
|
|||||||
*out_true++ = *first;
|
*out_true++ = *first;
|
||||||
else
|
else
|
||||||
*out_false++ = *first;
|
*out_false++ = *first;
|
||||||
return std::make_pair<OutputIterator1, OutputIterator2> ( out_true, out_false );
|
return std::pair<OutputIterator1, OutputIterator2> ( out_true, out_false );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user