Compiler Error C2650
'operator' : cannot be a virtual function
A new
or delete
operator is declared virtual
. These operators are static
member functions and cannot be virtual
.
Example
The following sample generates C2650:
// C2650.cpp
// compile with: /c
class A {
virtual void* operator new( unsigned int ); // C2650
// try the following line instead
// void* operator new( unsigned int );
};
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for