Boost logo

Boost :

From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2002-07-26 07:20:28

> Sure, I'm all for toys, as in "this doesn't really do everything I'd want
> from a real example, but it shows me how the system works". The problem I
> have with ia_experiment.cpp is that my first reaction was "why would anyone
> want an "iterator" which does *that*?" The fact that it iterates over only
> two elements and stores its value internally is pretty weird. I think most
> people who have only seen the standard iterators would have a hard time
> imagining that this is also an iterator. Though technically, it is an
> iterator, it's so different in nature from most iterators that it seems
> like it would be completely foreign.
> What about a singly-linked-list iterator example? Wouldn't that show
> everything you're illustrating, but more transparently?

Why not some kind of rotation iterator. The advantage of this example is that
there's a std::rotate in the STL which modifies the container whereas the
rotation_iterator_adaptor can give you the same result but withouth modifying
the containers. AFAICT this is a strong argument in favour of the IA.


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