'type' : types with no linkage cannot be used as template arguments
You cannot generate a template class (a class from a class template) based on a local type. Types used to instantiate templates must have external linkage.
Example
template<class T> class X{}; void f() { struct Y{}; X<Y> x; // error }