how to specify no vtable for a class ?

John (Eljay) Love-Jensen eljay@adobe.com
Thu Aug 31 12:05:00 GMT 2006


Hi Vincent,

I am not aware of a GCC C++ equivalent to the MSVC++ __declspec(novtable).

Since __declspec(novtable) is a hand-coded optimization, you should be able to get by without having one.

I'd be shocked if the absence of that (questionable!) optimization was sufficiently a performance penalty as to be warranted, even in contrived toy applications meant to exacerbate that situation.  Unless profiling indicates otherwise -- then I'd be a believer.

--Eljay

MSDN article on __declspec(novtable):
http://msdn.microsoft.com/msdnmag/issues/0300/c/



More information about the Gcc-help mailing list