stl container as template argument
let's say I have a function like this:
and I would call it as follows:
template<typename ContainerT, typename ValueT>
void foo(const ContainerT<ValueT>& c)
typedef ContainerT<ValueT> type;
for (type::iterator it = c.begin(); it != c.end(); ++it)
// do some stuff
obviously this will not compile, because the compiler has no way of knowing that ContainerT is a template type.
is there any way to make something like this work?