There are two types A and B, a correspondence is established between the objects of these types. There is a set of X values of type A and an iterator on this set. It is necessary with minimal effort based on the X iterator to get an iterator on the values of type B.
In general, simply speaking, there is a container of type A, from iterator A you need to get iterator B, because the client accepts iterators B.
For example:
typedef std::pair<int, float> A; typedef float B; B A2B(const A & item) // соответствие между A и B { return item.second; } std::vector<A> X; input_iterator<B> bi = magic_iterator_wrapper(A2B, X.begin()); What could be magic_iterator_wrapper ?