what's the __declspec(novtable) meaning

Apr 16, 2012 at 12:28pm
Title Like.
Apr 16, 2012 at 1:36pm
__declspec is a Microsoft C++ specific keyword. (The IS allows such implementations specific use of names).

__declspec(novtable) is an optimization directive in Microsoft C++ that tells the compiler not to generate a vtable for a class.

It can be (non-portably) used for a class which
a. is never used by itself as a complete object, but serves as a base class from which other classes can be derived.
b. has constructor(s) and destructor that never need a vtable lookup - they never cause virtual functions to be called virtually.
Apr 17, 2012 at 1:48am
thanks for your help.
Topic archived. No new replies allowed.