At Tue, 14 Dec 2010 12:21:49 +0100, Sebastian Redl wrote:
On 14.12.2010 11:17, Dave Abrahams wrote:
At Tue, 14 Dec 2010 10:44:12 +0100, Sebastian Redl wrote:
5.2.10p7 in the current draft defines the semantics of reinterpret_cast between standard-layout types via this double static_cast, so there is no difference. That's an draft for C++0x. I assume the OP wants the code to work under C++03.
I'd be very surprised if you could show me a compiler that differs in this behavior. I'd be even more surprised if any compiler would now change behavior *away* from what is coming for C++0x.
That may not be the only thing that matters. Perhaps he has program analysis tools like a lint that would detect the issue. -- Dave Abrahams BoostPro Computing http://www.boostpro.com