I have a template function as follows:
template <typename T>
int my_func(T& arg)
T is expected to be of type map<T1, T2>. T1 is expected to be of a basic type (int, long, etc.) and T2 is expected to be of type vector<T1>/list<T1>/etc.
I want to iterate over the contents of T2. How can I do this when I do not know what type T2 is? For example:
T2::const_iterator pos = ...;