"David B. Held" <[EMAIL PROTECTED]> writes:
> Does this have any merit whatsoever?
>
> template <typename T, typename U>
> T* dangerous_cast(U* p)
> {
> return static_cast<T*>(static_cast<void*>(p));
> }
>
> Obviously, you only use it when you know the binary layout of some
> object(s) and no other cast produces defined or reliable behaviour.
> Of course, I'm not sure this produces either of those either. :(
It's better than reinterpret_cast for most purposes. Not sure about
the name.
how-about-hellfire_breathing_cast-ly y'rs,
--
David Abrahams
[EMAIL PROTECTED] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost