This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] First bits of the algo merge
Paolo Carlini wrote:
>>If we want to accommodate those customers, a simple fix is:
>>
>>+ return std::mismatch(__first1, __last1, __first2,
>>+ __gnu_cxx::__ops::equal_to<value_type1, value_type2>());
>> }
>>
>>
>>+ template<typename _Lhs, typename _Rhs>
>>+ struct equal_to
>>+ {
>>+ bool
>>+ operator()(const _Lhs& __lhs, const _Rhs& __rhs) const
>>+ { return __lhs == __rhs; }
>>+ };
>>
>>
>assuming nobody disagree (well, Chris, in particular), I will adjust
>things as part of the merge, everywhere.
>
>
Humpf!
In order to check that everything was fine (also wrt __ops::bind2nd), I
decided to implement first the full change in v7-branch... and stumbled
on partial_sort_copy. The problem is that the predicate is both passed
to helpers working on the result iterators (i.e., make_heap, sort_heap)
and on a pair (first, result_first). Therefore, *which* value_types?!?
Paolo.