Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-12-05 12:52:01


Sounds like a good idea to me!

On Wed, 5 Dec 2001, Dan Gohman wrote:

gohman> On Wed, Dec 05, 2001 at 09:46:26AM -0500, David Abrahams wrote:
gohman> >
gohman> > boost::make_projection_iterator<std::select1st>(some_map.begin())
gohman> >
gohman>
gohman> Could I suggest adding convenience versions of these to boost?
gohman> For my own code I have a make_key_iterator and make_data_iterator
gohman> that are based on the iterator adaptors library (although they
gohman> don't use projection_iterator currently). They are quite handy
gohman> for working with std::map. Perhaps better names for these might
gohman> be make_1st_iterator and make_2nd_iterator.
gohman>
gohman> Another iterator that is useful is make_indexed_iterator, which
gohman> does for Boost tuples what the above do for pairs.
gohman>
gohman> make_indexed_iterator<2>(x.begin())
gohman>
gohman> where x.begin() is an iterator over a container of tuples.
gohman> This makes an iterator that presents the element at the
gohman> specified index of the tuples. I haven't used this one as
gohman> much because I don't (yet) use tuples much, and it could
gohman> probably use a better name :-).
gohman>
gohman> Dan
gohman>
gohman> --
gohman> Dan Gohman
gohman> gohmandj_at_[hidden]
gohman>
gohman> Info: http://www.boost.org Send unsubscribe requests to: <mailto:boost-unsubscribe_at_[hidden]>
gohman>
gohman> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
gohman>
gohman>

----------------------------------------------------------------------
 Jeremy Siek http://php.indiana.edu/~jsiek/
 Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_[hidden]
 C++ Booster (http://www.boost.org) office phone: (812) 855-3608
----------------------------------------------------------------------


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