Compiler Error C2498
'function' : 'novtable' can only be applied to class declarations or definitions
This error can be caused by using __declspec(novtable)
with a function.
Example
The following sample generates C2498:
// C2498.cpp
// compile with: /c
void __declspec(novtable) f() {} // C2498
class __declspec(novtable) A {}; // OK
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