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 C2298

'operation' : illegal operation on pointer to member function expression

A pointer to member-function expression must call the member function.

Example

struct X {
    int mf() { return 0; }
};

X x;
int (X::*pmf)() = &X::mf;

int main()
{
    int (*pf)();
    pf = x.*pmf;   // error
    +(x.*pmf);     // error
    return 0;
}