<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Sorry this took so long.  Had to learn a whole bunch about varargs templates.<div class=""><br class=""></div><div class="">This is a first attempt at an LLVM zip iterator.  I needed to add methods to STLExtras.h which do ++tuple<> and *tuple<>.  Originally I put those under different names and didn’t override the operators, but then I didn’t see any harm in overriding them.  I can rename them if anyone has a preference for that.</div><div class=""><br class=""></div><div class="">The zip iterator itself is almost identical to the edge_iterator I had before, just that it is now templated on its iterator type.  I’ve provided a subclass in zip_input_iterator for users who don’t need all the parameters and just want to provide a varargs of iterator types.  All of this is of course up for discussion, this is just one way I could see to implement it.</div><div class=""><br class=""></div><div class="">I also allowed for zip_iterator_traits so that users could provide their own type to return from operator*.  This is so that users don’t have to remember which iterator is first, second, get<0>, etc.  Personally I think its much more readable than to have .Value, .Block, etc.  This is optional though, as there’s a default implementation to provide a dereferenced tuple type from operator*.</div><div class=""><br class=""></div><div class="">BTW, no idea how much of this is MSVC safe.  I did find a user of 'auto fn()->decltype()’ in PDBTypes.h, so i’m not the first user of that, but this will need someone with MSVC to ok the final implementation.</div><div class=""><br class=""></div><div class="">I also need to write a unit test for all the functionality this enables.  Duncan mentioned std::copy requiring operator* to return a reference.  I’m still working through whether thats working or whether we only really have foreach support right now.</div><div class=""><br class=""></div><div class="">Duncan also pointed out in person, perhaps this is overkill as the edge_iterator I had before was easier to understand than what we have here.  Perhaps we’d prefer to hold off on a zip_iterator until we are sure we have more users for it.  If thats the case, then i’m happy for this to just be a demonstration of how it could be done, but not necessarily something to commit now.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Pete</div><div class=""><br class=""></div><div class=""></div></body></html>