From: Anthony Williams (anthony.williamsNOSPAM_at_[hidden])
Date: 2003-09-19 07:10:12
I would like to submit my "pair iterators" library for inclusion in boost. The
library is described in my article "Pairing off Iterators" from Overload 51,
which is available at http://cplusplus.anthonyw.cjb.net/pair_iterators.pdf
The source code for the library is available at
I have also written a modified version of the code which supports tuples,
which I have uploaded to the boost files area on yahoo groups as "tupleit.zip"
The basic premise is an iterator adapter that converts a pair (or tuple) of
iterators into an iterator that returns a pair (or tuple), so that, for
example, one can sort several containers simultaneously, based on a key held
in only one of them. A key feature is that where the underlying iterators
return a lvalues, the pair (or tuple) iterator will also return an lvalue that
can be used to modify the original values.
The pair iterators support the lowest iterator category of the underlying
iterators, so if all the underlying iterators are random access, then the pair
iterator will be random access (thus allowing use with algorithms such as
sort), whereas if one of the underlying iterators is only an input or output
iterator, then the pair iterator will also be only an input or output
-- Anthony Williams Senior Software Engineer, Beran Instruments Ltd. Remove NOSPAM when replying, for timely response.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk