[Patch] First bits of the algo merge

Paolo Carlini pcarlini@suse.de
Wed Dec 14 11:07:00 GMT 2005


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.



More information about the Libstdc++ mailing list