Boost logo

Boost Users :

Subject: Re: [Boost-users] metaprogramming help
From: John Dlugosz (JDlugosz_at_[hidden])
Date: 2010-12-14 13:10:57


> 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.
>
> Sebastian

I agree. Except for some exotic architectures, and looking only at the "sensible" case where the two types have the same alignment and are probably just declaring the same data members in the same order, the reinterpret_cast should give the same address.

FWIW, the code base in question is currently compiled under Microsoft VS2008, and will soon move to VS2010. And contains reinterpret_cast calls. I'm replacing them with something tamer, as well as making sure subsequent use of the idiom is more formalized.

Defining a cisam explicitly indicates something that needs to be tested. Having random casts throughout the code is always a wildcard.

===== Begin Overly-Verbose Footer =====

TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.


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