Remove algo duplication

Paolo Carlini paolo.carlini@oracle.com
Mon Sep 16 15:10:00 GMT 2013


Hi,

On 09/16/2013 04:54 PM, Marc Glisse wrote:
> On Mon, 16 Sep 2013, Paolo Carlini wrote:
>
>> Testcases? If we have solutions which would not get right some 
>> concrete cases, we should really have testcases for those, in my 
>> opinion. Then we should double check the standard about those, how 
>> much is QoI and how much just plain conformance. Does C++11 
>> eventually spell out more details about proxy iterators? I think at 
>> some point it was a goal, but I'm not sure how much went into the 
>> actual Standard. In principle we could even envisage two different 
>> forwarding strategies, one for C++98, pretty good, not perfect, but 
>> well within C++98 conformance. A better one for C++11, which would be 
>> able to exploit the whole move semantics, "perfect" forwarding 
>> support we have got in the language. The hope is that the whole 
>> predefined_ops.h would be anyway decently compact and understandable.
>
> I think having the simple lexicographical_compare forward to the 
> predicate version with std::less<void>() is valid. All I am saying is 
> that I'll be able to tell the difference if we do it, but that's just 
> because some copy elision won't happen (in a contrived testcase), and 
> compilers were never forced to do copy elision, so that's ok. It 
> should even work in C++03 with an emulation of less<void> using 16 
> overloads (T cv1&, U cv2&).
I see, nice.
> By the way, I thought someone had contributed less<void> and the 
> others already, but I can't see them. Did I imagine that patch?
Humm, I guess so :-) Jon has definitely some work in the making but I 
don't think he mentioned it. Thus, I suppose we are looking for 
volunteers ;)

Paolo.



More information about the Libstdc++ mailing list