There are three different types of template arguments: values, types, and templates:
template <int value_argument> class C { }; template <class type_argument> class D { }; template <template<classT> class template_argument> class E { };
When using these templates, you need to provide an argument of the correct type:
C<3> c; D<int> d; E<C> e;
When using the third form, the template template argument, the template passed as the argument must match the template template argument declaration. In my simple examples, pattern E expects an argument to a pattern template that takes a single type argument.
In the code in the question, the first argument in the Foobar declaration is the template <class> class TContainer . In the place where it was used, the passed std::vector template:
Foobar<std::vector, IUnknown*> bla(v);
The problem is that the template template argument says that it must have one argument, but the template that is passed as the actual argument has two or more. Formally std::vector is
template <class T, class Allocator = std::allocator<T>> class vector { ... };
To use std::vector> as the first argument to Foobar , the definition of Foobar` needs to be changed so that the first argument takes two arguments of the type:
template <template<class, class> TContainer, class TObject> class Foobar { ... };