Boost logo

Boost :

From: Alex Chovanec (achovane_at_[hidden])
Date: 2004-08-06 10:25:34

You're right. It's the same idea. I looked at counting_iterator once before,
but I somehow developed the impression that it was something more
specialized. As you suggest, I think I was a bit thrown off by the name.

This was actually a necessary prerequisite for another library that I was
going to propose, so I'm glad to see that it's already in there. : )

Sorry for the redundant post.


"Thomas Witt" <witt_at_[hidden]> wrote in message
> Alex,
> Alex Chovanec wrote:
> > I realize that this isn't the best time for proposals, what with
> > trying to get the next release of boost out, but I have an idea for a
> > iterator adaptor which I'd like to propose.
> >
> > Consider an adapted iterator type Iter with base iterator type Base that
> > the following traits:
> >
> > typedef Base value_type;
> > typedef const Base & reference;
> >
> > When you dereference an instance of the adapted iterator type Iter, you
> > a const reference to its base iterator of type Base. So instead of
> > delegating the dereference operation to its base and returning the
> > the iterator adaptor simply returns its base. Since it doesn't
> > its base, I would probably name it "lazy_iterator", or something like
> IIUC it's currently named counting_iterator. I.e. the main point of
> counting_iterator isn't the counting but the non-dereferencing. Where
> does your idea differ from counting_iterator?
> Thomas
> --
> Thomas Witt
> witt_at_[hidden]
> _______________________________________________
> Unsubscribe & other changes:

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