Struct has_vtable
Synopsis
#include <Source/Falcor/Core/Framework.h>
template<class T>
struct has_vtable
Description
Helper class to check if a class has a vtable. Usage: has_vtable<MyClass>::value is true if vtable exists, false otherwise.
Classes
derived |
Source
Lines 218-226 in Source/Falcor/Core/Framework.h.
template<class T>
struct has_vtable
{
class derived : public T
{
virtual void force_the_vtable() {}
};
enum { value = (sizeof(T) == sizeof(derived)) };
};