This is the mail archive of the
mailing list for the libstdc++ project.
Re: Remove algorithms implementation duplications
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: François Dumont <frs dot dumont at gmail dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Wed, 18 Jul 2012 18:50:48 +0200 (CEST)
- Subject: Re: Remove algorithms implementation duplications
- References: <4FFDCB54.email@example.com>
- Reply-to: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
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
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.