|
Boost Users : |
From: Darin Adler (darin_at_[hidden])
Date: 2002-06-27 09:11:01
On Thursday, June 27, 2002, at 06:38 AM, Jean Llorca wrote:
> Here upcasting means casting a base class to a derived class, I know
> it may seem strange, bust boost offers a downcast
> which does the static_cast the language does implicitly already (check
> <boost/cast.hpp>).
I think you've got it backwards. Downcasting, in Boost at least, means
casting a pointer to a base class part of an object to a pointer to a
derived class part of the same object. The polymorphic_downcast is
*not* doing a static_cast for a conversion the language already does
implicitly.
Could you give a specific complete example (a file that would compile,
with all the declarations) of how one would use what you're proposing
to help make this clearer?
-- Darin
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net