Alfredo Braunstein wrote: > Andre Poenitz wrote: > >> Good. >> >> [Note that Angus recently had some problems related to >> [dynamic_cast...] > > What kind of problems? In the practical side, should I apply or > wait?
Maybe real problems with an old gcc 2.95-ish compiler (Christian's). Maybe merely problems with the logic of my code. Either way, the problems should now be resolved. I tidied up the logic but also did away with dynamic_cast using the mathed solution instead: class Derived1; calss Derived2; class Base { virtual Derived1 * asDerived1() { return 0; } virtual Derived2 * asDerived2() { return 0; } ]; class Derived1 { virtual Derived1 * asDerived1() { return this; } }; class Derived2 { virtual Derived2 * asDerived2() { return this; } }; I think you should keep the dynamic_cast for now, get Christian to try it out and if it doesn't work for him then change it. -- Angus