Boost logo

Boost :

From: Hartmut Kaiser (hartmutkaiser_at_[hidden])
Date: 2004-01-09 10:36:51

David Abrahams wrote:

> > You're right, but IMHO this is a complete different situation. The
> > iterator adaptor constructor copies the iterator parameter
> anyway into
> > the own m_iterator member, so further working of the
> iterator_adaptor
> > does not rely on a reference as would do the algorithms, if they'd
> > take references. Taking the iterator parameter by const reference
> > simply would avoid one additional copy operation, which may
> be costly for more complex iterators.
> The only thing that gives me pause are Andrei's findings here:
> Are they inapplicable in this case?

Completely relying on MOJO or similar techniques would require, that I'm
able/allowed to _modify_ the base iterator code, which isn't always true.

Regards Hartmut

Boost list run by bdawes at, gregod at, cpdaniel at, john at