
27 Oct
2008
27 Oct
'08
2:24 p.m.
Zip iterator implements the functionality I need to advance associated iterators through different ranges, but it seems strangly awkward to use, which is odd for Boost. so I'm wondering if I've misunderstood the design paradigms. Given two ranges (say vectors), I'd like to be able to generate an iterable composite, anditerate through that, something like vector<int> v1; vector<int> v2; typedef zip_composite<int, int> Z; Z zip( v1, v2 ); for ( Z::iterator i=zip.begin( ); i !=zip.end( ); ++i ) { // ... blah, blah, blah } Is this impossible or undesirable to implement for reasons I've not realized? Thanks, Rob.