From: Moore, Paul (paul.moore_at_[hidden])
Date: 2000-11-14 04:13:11
From: AlisdairM - BTInternet [mailto:AlisdairM_at_[hidden]]
> A circular iterator has a beginning and no end, whereas I am
> proposing a container where objects have a limited lifetime, long
> enough until they are pushed out by new arrivals. As such, it should
> always be possible to know when you have iterated once through the
> entire container.
It strikes me that you could do this by a variation on the theme of a
back_inserter - an adapter which provides an output iterator which inserts
data into the container in the manner you wish. Traversing the queue
requires a variation on the circular iterator theme. And as the two need
shared state (the current "start" location) it could be packaged into an
adapter class of some sort.
Implementing this is, as is traditional, left as an exercise for the reader.
But I'd love to see the results in boost!
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk