Remove algorithms implementation duplications
Marc Glisse
marc.glisse@inria.fr
Thu Jul 19 19:47:00 GMT 2012
On Wed, 11 Jul 2012, François Dumont wrote:
> Here is the new patch based on Marc Glisse idea to use functors taking
> iterators rather than iterators::reference. Compare to the previous proposal
> there is no more impact on the creation of temporaries instances, no
> additional copy or move constructor. Of course there are additional iterators
> or functors copies but those types are supposed to be lightweight types easy
> to copy.
I may have shot myself in the foot with that one ;-) (I sometimes have
heavy iterators and functors, but that's my problem).
I can't review the patch, but I have a question, if you have time: what is
your personal feeling on which approach is simpler, which yields the
cleanest code, which is more flexible? Or are they all roughly the same?
You spent quite a bit of time implementing several versions of this patch,
and I would be happy to learn from your experience.
--
Marc Glisse
More information about the Libstdc++
mailing list