I've spent quite some time trying to understand that monstrosity. Can you explain whats goin on here?
void IncRef(const char *file, const int line)
{
reinterpret_cast<void(*)(T*, const char*, int, UINT32)>(
(*reinterpret_cast<void***>(obj))[1])(obj, file, line, type);
}
void DecRef(const char *file, const int line)
{
reinterpret_cast<void(*)(T*, const char*, int, UINT32)>(
(*reinterpret_cast<void***>(obj))[2])(obj, file, line, type);
}
And by the way, operator * returns T&, not T*