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) C4529

'member_name' : forming a pointer-to-member requires explicit use of the address-of operator ('&') and a qualified name

A pointer to a non-static member function of a class or structure must have the form of an & followed by the qualified identifier not enclosed in parentheses. This warning is only issued under /Ze. This warning is disabled by default.

The following sample generates C4529:

#include <stdio.h>
#pragma warning(1:4529)

struct A { 
   void f(){
      printf("test");
   } 
   void g(); 
};
 
void A::g() {
   void (A::*p3)() = A::f;   // C4529
   void (A::*p4)() = &A::f; // correct way
}
 
void main() {
   A a;
   A *ptr = new A;
   void (A::*p3)() = A::f;   // C4529
   void (A::*p4)() = &A::f; // correct way
   (ptr->*p4)();
}