From: Paul Hollingsworth (boost_at_[hidden])
Date: 2001-07-17 09:57:54
> i don't think your approch is a better one....this needs space and
> a kind of copy operator has to be called internally.
I suspect that without looking at the generated code on some popular
compilers, it is not obvious that returning a copy of the iterator is
going to be less efficient than the alternatives.
The compiler is free to optimise out redundant calls to the copy
constructor. This is a situation in which the Return Value
Optimisation might come into play, for example.
In any case, my point was that most programmers (which is what I
meant by the phrase "average programmers") really don't (and should
not) care about micro-inefficiencies like this, and would prefer a
more uniform and hence less error prone interface.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk