Remove algo duplication
Paolo Carlini
paolo.carlini@oracle.com
Mon Sep 16 13:25:00 GMT 2013
Hi,
On 09/16/2013 01:57 PM, Marc Glisse wrote:
> That's the easiest solution, just forward the non-predicate algorithm
> to the predicate-algorithm with std::less<void>() as last argument. It
> isn't completely equivalent to the current separate code, the question
> is whether it is close enough. The version with predicates on
> iterators is perfect (I don't think a user can observe the
> difference), but then the question is if it is too complicated / weird.
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.
Paolo.
More information about the Libstdc++
mailing list