
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@acm.org> wrote in message news:cf053d$rk3$1@sea.gmane.org...
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 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
everyone 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@acm.org
_______________________________________________ Unsubscribe & other changes: