I really like that example iterator (I was just typing up an email to suggest it when I received this one). The example does something useful, and you can easily see the difference between reading lines of input without the iterator, and with the iterator. The comment on page 5 of that book really emphasizes just how much this example would benefit from using iterator_adaptor "Don't worry if you don't yet understand why everything in the line_iterator class is there; parts of it are only necessary for technical reasons." -elliot -----Original Message----- From: Jeremy Siek [mailto:jsiek@cs.indiana.edu] Sent: Friday, July 26, 2002 10:29 AM To: Boost-Users@yahoogroups.com Cc: boost@lists.boost.org Subject: Re: [Boost-Users] Re: [boost] Iterator Adaptor Poll Here's another idea for a "hello world" example. A rewrite of Matt Austern's line_iterator example from his Generic Programming and the STL book. The line_iterator call getline() and then return a std::string from operator*. On Fri, 26 Jul 2002, David Abrahams wrote: dave> dave> That's neat, but we already have the permutation adaptor, and I dave> don't think it's really a simple enough example. Beman's example dave> just makes a simple iterator, not an adaptor, and I think that's an dave> important feature for a "hello, world"-type introduction. dave> dave> -Dave ---------------------------------------------------------------------- Jeremy Siek http://php.indiana.edu/~jsiek/ Ph.D. Student, Indiana Univ. B'ton email: jsiek@osl.iu.edu C++ Booster (http://www.boost.org) office phone: (812) 855-3608 ---------------------------------------------------------------------- Yahoo! Groups Sponsor Click here to find your contact lenses! Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.