Is there a g++ equivalent to Visual Studio's __declspec(novtable)
argument?
Basically, in a pure virtual base class the __declspec(novtable)
argument can be used to suppress the creation of a vtable for the base class as well as vtable initialization/deinitialization code in the contstructor/destructor respectively. E.g.,
class __declspec(novtable) PureVirtualBaseClass
{
public:
PureVirtualBaseClass(){}
virtual ~PureVirtualBaseClass() = 0;
};
See Paul DiLascia's article for more info. Also see my related question.
See Question&Answers more detail:os