|
Boost : |
From: Valentin Bonnard (Bonnard.V_at_[hidden])
Date: 1999-09-20 10:55:46
Darin Adler wrote:
> - polymorphic_downcast allows incorrect casts that arise in presence of
> multiple inheritance
> + change implementation to use stronger assert
I don't how this could happen: if there is more than
one base class, the dynamic_cast will fail.
If it's a side-way cast (Base1 to Base2), the static_cast
won't compile.
Do you have a proof, a justification, an
explanation, or an example ?
> - want cast that works like static_cast<>, but only for casting from
> void* since that's a common reason to use it
Well, void* to X* conversion is just another
THIS-IS-REALLY-A<X>, which is generally done
by static_cast.
-- Valentin Bonnard
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk