c++ data alignment /member order & inheritance

后端 未结 9 1642
礼貌的吻别
礼貌的吻别 2020-11-29 01:34

How do data members get aligned / ordered if inheritance / multiple inheritance is used? Is this compiler specific?

Is there a way to specify in a derived class how

9条回答
  •  执笔经年
    2020-11-29 01:58

    It is compiler specific.

    Edit: basically it comes down to where the virtual table is placed and that can be different depending on which compiler is used.

提交回复
热议问题