C++ question
Michael Goffioul
goffioul at imec.be
Wed Sep 25 13:39:30 BST 2002
> Well almost impossible. rtti is active. So in case you know all possible
> children, you can just write a switch to call the right function.
>
> Infact since rtti is active, some compilers might support calling virtual
> functions in constructors. It would just be a special case and non-standard
> ofcouse.
> ( I guess since so many people writes it is impossible, that gcc havent got
> that extension )
gcc-3.1 refuses to compile if the pure virtual method is called directly
from the constructor. If called in a function, that is called from the
constructor, it compiles, but crashes.
Michael.
--
------------------------------------------------------------------
Michael Goffioul IMEC-DESICS-MIRA
e-mail: goffioul at imec.be (Mixed-Signal and RF Applications)
Tel: +32/16/28-8510 Kapeldreef, 75
Fax: +32/16/28-1515 3001 HEVERLEE, BELGIUM
------------------------------------------------------------------
More information about the kde-core-devel
mailing list