I am trying to compute the memory offset of a base class with its parents in a multiple inheritance scenario, I hope to find a general solution the would work for simple and multiple inheritance with or with out virtual function or virtual inheritance.
I'm fairly certain that there's no portable, reproducible way to do this for all scenarios. I'm curious about what problem you're trying to solve.
The problem i am trying to solve is a reflection system. I need the offset to make my own dynamic_cast. Really there is no portable way? Why?