|
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.
Alex
"Thomas Witt" <witt_at_[hidden]> wrote in message
news:cf053d$rk3$1_at_sea.gmane.org...
>
> Alex,
>
> Alex Chovanec wrote:
> > I realize that this isn't the best time for proposals, what with
everyone
> > trying to get the next release of boost out, but I have an idea for a
new
> > iterator adaptor which I'd like to propose.
> >
> > Consider an adapted iterator type Iter with base iterator type Base that
has
> > the following traits:
> >
> > typedef Base value_type;
> > typedef const Base & reference;
> >
> > When you dereference an instance of the adapted iterator type Iter, you
get
> > a const reference to its base iterator of type Base. So instead of
> > delegating the dereference operation to its base and returning the
result,
> > the iterator adaptor simply returns its base. Since it doesn't
dereference
> > its base, I would probably name it "lazy_iterator", or something like
that.
>
> 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:
http://lists.boost.org/mailman/listinfo.cgi/boost
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk