If I have two classes, one inheriting from the other, and the child class only containing functions, will the memory layout be the same for both classes?
e.g.
class Base {
int a,b,c;
};
class Derived: public Base {
// only functions.
};
I've read that the compiler can not reorder data members, and I do not require multiple-inheritance on the Derived
class. Is there any situation where the memory layout will not be the same? (Multiple inheritance may be needed for the Base
class)