Excellent. I knew there would be a good reason. Time to dig out a C++ book
again, I think.
Many thanks,
Angus
On Tuesday 20 March 2001 17:18, Lars Gullik Bjønnes wrote:
> Angus Leeming <[EMAIL PROTECTED]> writes:
>
> | Many thanks to you both, Lars and André. I'm still pretty ignorant when
it
> | comes to functors. I wrote a template function to achieve my goals. Is
> | your way better, or is it just a matter of style?
>
> Depends.... _I_ thing my version is better than your since it operates
> on iterators, so I don't have to copy the whole vector.
> This is also why I thing the back_inserter variant is better than the
> transform solution.
>
> It is also nice to use std::functors as building stones.
>
> And it also seems that you solution will have to copy the elements in
> the vector a couple od times more than the other solutions.
>
> Lgb