Boost logo

Boost :

From: yahoo_at_[hidden]
Date: 2001-03-01 02:57:21

--- In boost_at_y..., "md656" <md656_at_q...> wrote:
> > > template<class Iter> class Cyclic_iterator {
> > > public:
> >
> > > // and so on -- it's up to you to fill in the rest
> > >
> > > private:
> > > Iter begin, end, it;
> > > };
> > >
> >
> > The devil is in the "so on", that's why you REALLY want to use
> > Boost Iterator Adaptor Library, trust me .
> Can you explain this to me? I am new to the boost library.

Well, first you have some redundancy in iterators implementation
between * and ->, and post- and pre- increment / decrement.
Then you have to handle interactionsbetween const- and non-const
versions of your iterators...
It would be GREAT if you could just implement the behavior and
generate the implementation. I mean, it IS great ! Thanks to the
(future) Boost Iterator Adaptor Library.
Note that this is work in progress, as your can guess from the fact
that it is only available from CVS archive. I recommend you to
give it a try if you are implementing iterators, but you should
wait for it's adoption before using it in real projects.
Maybe it's still a moving target :-)

Have fun and let the compiler do the boring (error-prone) stuff !


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