|
![](/i/fill.gif) |
Warp wrote:
> The dynamic_cast will succeed if the object pointed by aPtr is in actuality
> of a type which has been multiple-inherited from A and B (even if by a very
> long inheritance chain). The foo() function doesn't need to know anything
> about that class in question, and can eg. be precompiled into a library.
That's what I thought you meant. I know you can't do it with a non-dynamic
cast in Eiffel, but I don't remember if you can do that in one step with a
dynamic cast. In all honesty, I would expect not. Meyer isn't that sort of
person. :-)
I can see where that could be handy, and even moreso if it weren't an
explicit dynamic cast. (I.e., if you could just pass aPtr into a function
expecting a bPtr and have it work automagically if the actual type inherited
from both.)
--
Darren New, San Diego CA, USA (PST)
Yes, we're traveling together,
but to different destinations.
Post a reply to this message
|
![](/i/fill.gif) |