illegal use of anonymous local type in template instantiation
You cannot generate a template function (a function from a function template) based on a local type. Types used to instantiate templates must have external linkage.
Example
template<class T> void f(T t) {}; void g() { struct {} x; f(x); // error }