peoro wrote:
Ok, it does work as expected if class Base has got at least one virtual member:
...What if I cannot add a virtual function to the class Base?
If your C++ base class has no virtual methods, even pure C++ can't
dynamic_cast<> it.
Put differently -- you've been asking Python to determine the runtime
type of a class for which C++ maintains no runtime type. It's the
presence of at least one virtual method that forces C++ to start
tracking the runtime type of a class hierarchy.
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig