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 Warning (level 1) C4560

'argument' : non-constant default arguments unavailable when importing NGWS runtime function

This warning results when you use a non-constant value as an argument to a NGWS function that is called when you #import its module. NGWS metadata can only represent constants as values for default arguments to functions. The default argument would still work as expected when #import is not used.

The following code will produce warning C4560 if you #import the module:

int i;
void f(int j = i){   //error; i is non-constant
}

Solution

Remove the default argument or find a constant to use as a default instead.