[Patch] First bits of the algo merge
Howard Hinnant
hhinnant@apple.com
Wed Dec 14 15:38:00 GMT 2005
On Dec 14, 2005, at 10:32 AM, Paolo Carlini wrote:
> Paolo Carlini wrote:
>
>>> 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?!?
>>>
>> Well, maybe the issue is not so serious, because, among the concepts
>> naturally there is:
>>
>> __glibcxx_function_requires(_ConvertibleConcept<_InputValueType,
>> _OutputValueType>)
>>
>> and, if I understand correctly, that appear to imply that
>> <_OutputValueType, _OutputValueType> is fine.
>>
>>
> Actually, this issue is nasty, very nasty, and affects much more
> seriously equal_range, binary_search and other functions which pass
> around the predicate.
>
> Honestly, I'm about to give up, at least as far as mainline is
> concerned.
I just now looked at partial_sort_copy and came to the same
conclusion you did (<_OutputValueType, _OutputValueType>). I'll go
look at equal_range and binary_search...
-Howard
More information about the Libstdc++
mailing list