Hi Everyone,
Have you tried to use iterator adaptors and found the documentation
wanting? I have recently updated the documentation in the CVS:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/boost/boost/libs/
utility/iterator_adaptors.htm?rev=HEAD
However, enough people have had problems approaching this library that I
thought it would be useful to ask about what would make a gentle
introductory example. Beman recently sent me the enclosed, but it seems to
define such an oddball toy iterator that I'm not sure it would be a very
good motivating example. I'm asking for input, especially from anyone who
has "gotten over the hump" so to speak, with iterator adaptors.
TIA,
Dave
---------------------------------
David Abrahams * Boost Consulting
dave@boost-consulting.com * http://www.boost-consulting.com
----- Original Message -----
From: "Beman Dawes"
Dave,
Thanks for fixing the docs. I fixed and committed to CVS one more change of BaseType -> Base.
I found I needed an even more basic example than anything in the docs to play with, particularly for creating an iterator from scratch, and put together the attached.
It is very simple, and does not demonstrate advanced features, but it answered newbie questions I had in a way that only running code, modifying it, and running again can do. (Not to mention fixing all the errors I made before it would compile!)
Feel free to include it in the distribution if you think it would help others. Needs a better name of course.
--Beman
----------
// Really dumb iterator_adaptor example program -----------------------------//
// (C) Copyright Beman Dawes 2002. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
#include