Compiler Warning C4867
'function': function call missing argument list; use 'call' to create a pointer to member
A pointer to member function was initialized incorrectly.
This warning can be generated as a result of compiler conformance work that was done for Visual Studio 2005: enhanced pointer-to-member conformance. Code that compiled prior to Visual Studio 2005 will now generate C4867.
This warning is always issued as an error. Use the warning pragma to disable this warning. For more information about C4867 and MFC/ATL, see _ATL_ENABLE_PTM_WARNING.
Example
The following sample generates C4867.
// C4867.cpp
// compile with: /c
class A {
public:
void f(int) {}
typedef void (A::*TAmtd)(int);
struct B {
TAmtd p;
};
void g() {
B b = {f}; // C4867
B b2 = {&A::f}; // OK
}
};
Feedback
https://aka.ms/ContentUserFeedback.
În curând: Pe parcursul anului 2024, vom elimina treptat Probleme legate de GitHub ca mecanism de feedback pentru conținut și îl vom înlocui cu un nou sistem de feedback. Pentru mai multe informații, consultați:Trimiteți și vizualizați feedback pentru