
on Thu Nov 05 2009, Gottlob Frege <gottlobfrege-AT-gmail.com> wrote:
You'd think reinterpret_cast<> would be enough to tell the compiler to back off. And the 'fixed' code is no better or worse. (I actually find the original version more understandable - ie closer to the intent of the code.) And what if the next version of the compiler recognizes the fixed code as bad as well? At some point will it be 'you just can't do that'? (P.S. can't you reinterpret_cast references as well? ie reinterpret_cast<Storage &> ?)
Why is any Boost code using reinterpret_cast? There's very little you can do portably with reinterpret_cast, and IIRC, what little you *can* do portably can also be done with static_cast. -- Dave Abrahams Meet me at BoostCon: http://www.boostcon.com BoostPro Computing http://www.boostpro.com