本文共 482 字,大约阅读时间需要 1 分钟。
15.4.5. Virtuals in Constructors and Destructors
A derived object is constructed by first running a base-class constructor to initialize the base part of the object. While the base-class constructor is executing, the derived part of the object is uninitialized. In effect, theobject is not yet a derived object.
Note:If a virtual is called from inside a constructor or destructor, then the version that is run is the one defined for the type of the constructor or destructor itself.
转载地址:http://vyyii.baihongyu.com/