I need to study how a Constructor of class initializes its object.
The key information about constructor behavior that I have is:
- Constructor fills the vtable of object.
- Constructor don’t have name, hence no function-pointer.
How can I write code that will:
- get me address of constructor?
- trace the initialization of object?
Thanks in advance.
A better approach to taking the address of a constructor is just to write a wrapper template function around
new(with C++11 perfect forwarding, you need only one) and take the address of that.