
"Llew Sion Goodstadt" <leo.goodstadt@human-anatomy.oxford.ac.uk> writes:
Doesn't seem like such a great idea to me. It forces you to pay at each iteration of a loop when you could pay once to ensure that your ending zip iterator is formed from the correct position in each sequence. In my opinion the zip_iterator documentation should be improved (quite a lot) to make the requirements more explicit.
For iterators over a container, that is indeed true. In which case, surely it would be better to provide a constructor which calculates the minimum distance rather than relying on the user to remember to check beforehand.
These are iterators, not sequences. It is not appropriate to build length calculations into the construction of a single iterator. The right place for this sort of functionality would be in a library of sequence views. -- Dave Abrahams Boost Consulting www.boost-consulting.com