Jason Dawes wrote:
> However the C++ cast operations (like reinterpret_cast) are more 
> useful - for one thing you can test the result of the cast, unlike 
> (Handle)/(VoidHand) casts.

What do you mean?  IIRC, all the verbose_cast<> ops are really just the
old C "()" cast functionality, just factored out into more easy to
understand sub-functions.  The exception is dynamic_cast, which does
some fancy run time checking and sometimes returns null (which I think
is what you mean by testing the cast result) but that happens only if
you have RTTI enabled in the compiler.  But RTTI is disabled by default
(and I leave it off) so I don't think dynamic_cast even does much.  (But
my app doesn't use dynamic_cast or downcasting at all, so I don't know
about this for sure.  Or _any_ of this for sure.)

Isn't it scary how Stroustrup's book got _3_times_bigger_ between the
2nd Edition and 3rd Edition?  :-)

-slj-

Reply via email to