NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error C2919

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
}