|
Boost Users : |
Subject: Re: [Boost-users] Implementing Range Adaptor or "transformation" iterator
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2011-07-18 23:10:17
>
> On 7/18/2011 8:00 PM, Nathan Ridge wrote:
> > >
> > > But, it seems to me that there should be something like that already. Is there something
> > > I'm overlooking in STL or in some other Boost library?
> >
> > There is something you are overlooking in the Boost.Range library itself :)
> >
> > http://www.boost.org/doc/libs/1_47_0/libs/range/doc/html/range/reference/adaptors/reference/transformed.html
> >
>
> That's it, thanks.
>
> Hmm, but why is it producing a Single Pass Range? I would think it should naturally match
> the characteristics of the underlying Range.
Hmm... You're right, I see no reason why it needs to be a single pass range, and a quick look at
boost/iterator/transform_iterator.hpp shows that transform_iterator (the iterator type wrapped by
the range) does indeed leave alone the underlying iterator's traversal category.
Perhaps it's just a mistake in the documentation?
Regards,
Nate.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net