[Interest] qobject_cast
Igor Mironchik
igor.mironchik at gmail.com
Thu Apr 20 18:45:09 CEST 2017
20.04.2017 19:35, Igor Mironchik пишет:
> Hi,
>
>
>>> QObject has virtual destructor... dynamic_cast will work. But it
>>> doesn't
>>> matter, the problem was in another...
>> If your class has virtual functions or derives from such base class,
>> and have
>> inline (or default) virtual destructor,its v-table will be emitted
>> in each
>> translation unit. This is undesirable and can lead to subtle
>> problems. See e.g.
>>
>> http://llvm.org/docs/CodingStandards.html#provide-a-virtual-method-anchor-for-classes-in-headers
>>
>
> There said that it can lead just to increasing objects size in linking
> time. What problems may appear?
* increasing of .obj file size and linking time *
Yes, it's a problem, but not critical to me.
More information about the Interest
mailing list