Jim,
"Jim.Hyslop"
Jean Llorca (yg-boost-users@gmane.org) wrote:
I would like to propose, in the spirit of Bjarne Stroustrup book, an upcast (where target inherits source). Upcasting is already directly supported by the language. Given classes Base
I don't understand this - how is casting a Target to an unsigned int going to help? Did you perhaps mean Target * in the above example, or have I missed something? Yes, target is a pointer type, while Source isn't. That's because of the intended usage of this function which is A* a =
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