This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Remove algorithms implementation duplications


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]