[Qt-interest] Library binary compatibility issue
Giacomo S.
giacomo.strangolino at elettra.trieste.it
Fri May 21 14:27:20 CEST 2010
Il giorno ven, 21/05/2010 alle 12.29 +0200, Esben Mose Hansen ha
scritto:
> On Friday 21 May 2010 10:12:11 Giacomo S. wrote:
> > A question about binary compatibility issue in a library of mine:
>
> When you override a virtual function, the function itself is virtual. E.g, the
> attached program outputs
>
> C B A
> A 1 2 3
> B 2 3
> C 3
>
> If B::foo() had been non-virtual, the middle (which is a object of type C
> accessed through a pointer to type B) should have returned 2, not 3.
>
> Thus, the function you want to make virtual is already virtual, if I
> understand you correctly.
>
> Wish I had to time to dig it out of the standard :)
>
Thanks a lot!
I thought that reimplementing a virtual method declaring its
implementation as non virtual would have removed the virtual
behaviour...
Thanks again!
Giacomo.
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list