EmptyVirtualClass Class Reference

#include <apibase.h>

Detailed Description

An empty class with a virtual destructor. This can be used for a template parameter of a class template where the parameter sets the base class of the template. This ensures that already the top-level base class has a virtual destructor, which (for usual compilers) yields a simpler class layout than a class inheritance hierarchy where derived classes introduce virtual functions at first. Example:

template <typename S> class MyTemplate : public S { ... };
class MyClass : public MyTemplate<EmptyVirtualClass>
virtual void MyFunction();

Public Member Functions

virtual ~EmptyVirtualClass ()
@ S
Scale morphing.