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 C2918

'name' : illegal use of 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 {};
    X x;

    f(x);          // error
}