Why C++ virtual function defined in header may not be compiled and linked in vtable?

后端 未结 5 1322
既然无缘
既然无缘 2021-01-05 14:33

Situation is following. I have shared library, which contains class definition -

QueueClass : IClassInterface
{
   virtual void LOL() { do some magic}
}
         


        
5条回答
  •  难免孤独
    2021-01-05 14:45

    My guess is that GCC is taking the opportunity to inline the call to LOL. I'll see if I can find a reference for you on this...

    I see sechastain beat me to a more thorough description and I could not google up the reference I was looking for. So I'll leave it at that.

提交回复
热议问题