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 C2255

'function' : a friend function can only be declared in a class

A nonmember function is declared a friend.

Example

class A
{
private:
   void func1();
   friend void func2();
};
friend void func1() {};    // error
void func2() {};           // OK