有没有办法获得在 operator new 中分配的对象类型?
我的意思是:
void* BaseClass::operator new(size_t size)
{
void* result = ::operator new(size);
//Get type of object that's being allocated
return result;
}
有没有办法获得在 operator new 中分配的对象类型?
我的意思是:
void* BaseClass::operator new(size_t size)
{
void* result = ::operator new(size);
//Get type of object that's being allocated
return result;
}