Python\'s itertools implement a chain iterator which essentially concatenates a number of different iterators to provide everything from single iterator.
Is there so
I've written one before (actually, just to chain two pairs of iterators together). It's not that hard, especially if you use boost's iterator_facade
.
Making an input iterator (which is effectively what Python's chain
does) is an easy first step. Finding the correct category for an iterator chaining a combination of different iterator categories is left as an exercise for the reader ;-).