Boost logo

Boost :

From: Matthias Schabel (boost_at_[hidden])
Date: 2003-11-23 18:53:07


>> The documentation is a bit...sparse...
>
> Seriously? Did you follow the links to the standard proposals?

To quote from http://www.boost-consulting.com/boost/libs/iterator/doc/ :

"Testing and Concept Checking
        • iterator_archetypes.hpp: Add summary here
        • iterator_concepts.hpp: Add summary"

"Upgrading from the old Boost Iterator Adaptor Library

Turn your policy class into the body of the iterator

Use transform_iterator with a true reference type for
projection_iterator."

I consider those sections to be "sparse"... I guess I was hoping for a
small set of
examples demonstrating actual use of the new iterator adaptors for a
range of
cases spanning the basically trivial case above to something more
non-trivial.
It would be nice to have one functioning program demonstrating each
major
concept or intended use of the library. The existing docs (including,
esp.,
the proposal) are heavy on theory and short on implementation. Maybe
it's
just me, but I find it much easier to understand concepts, particularly
fairly
complex abstractions such as the new iterator proposal relies on, if
there is
a reasonably complete set of example cases of functioning code to refer
to.
Furthermore, there is so much in the iterator adaptor library that one
could
spend a significant amount of time and energy trying to understand it
all. While
this is well and good, I think there will be a decent body of users who
are
mostly interested in a quick and effective solution for simple iterator
adaptors
for whom the investment of time in understanding the details may not be
efficient.
If the user has to spend more time reading the documentation than it
would take
to slap together a simple home-grown implementation, it may impede
adoption
of the library.

>> I assume I can just plug back in the old iterator adaptor stuff
>
> I don't know what you mean by that.

Use the old <boost/iterator_adaptors.hpp> which was perfectly fine for
my purposes - the answer appears to be yes.

>> and be on my merry way until things have shaken out? Or is there an
>> easy way to accomplish the above with the new system?
>
> What's "the above?"

Wrapping a bare pointer to form a well-behaved iterator and wrapping
that
iterator to form a reverse iterator.

Cheers,
M

------------------------------------------------------------------------
---------------------------
Matthias Schabel, Ph.D.
Utah Center for Advanced Imaging Research
729 Arapeen Drive
Salt Lake City, UT 84108
801-587-9413 (work)
801-585-3592 (fax)
801-706-5760 (cell)
801-484-0811 (home)
mschabel at ucair med utah edu


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk