Does using __declspec(novtable) on abstract base classes affect RTTI in any way?

后端 未结 2 2198
闹比i
闹比i 2021-02-19 14:31

Or, are there any other known negative affects of employing __declspec(novtable)? I can\'t seem to find references to any issues.

2条回答
  •  时光说笑
    2021-02-19 15:23

    if I understand it correctly: Any virtual fn call inside a ctor or a dtor is converted to a compile time linking. We cannot make virtual fn calls from the (c/d)tors. The reason is that at the time the object of the base class is getting created it has no knowledge of the derived class and hence cannot make the call to derived class and w.r.t the dtors the same logic applies.

提交回复
热议问题