59d7b62f   
   From: dave@boostpro.com   
      
   on Sun Apr 15 2012, Mathias Gaunard wrote:   
      
   > On Apr 11, 10:37 pm, Dave Abrahams wrote:   
   >   
   >> Right, but I'm not aliasing the content of x. I'm aliasing the memory   
   >> that follows x.   
   >   
   > It's still the same object, just not the same subobject.   
      
   No, it's not the same object. There's a region of raw memory there with   
   no object in it.   
      
   >> Because it has behavior that's specified by the standard, whereas the   
   >> semantics of the reinterpret_cast are implementation-defined.   
   >   
   > static_cast is not any more well-defined in that case.   
      
   Yes it is. A few years ago I had this same argument with Gabriel Dos   
   Reis and put the question to the CWG. It was as though everyone   
   e-looked at me, e-blinked, and said, "of course the way you understand   
   it is correct. How else would it be?"   
      
   Now, of course I could always be wrong in my memory or understanding of   
   the response, and I don't have time right now to dig through the   
   standard for the language—of which I've now forgotten the specifics—that   
   led me to my conclusion. I formed my mental model of this stuff a while   
   ago, but I need more than your say-so to overturn my worldview.   
      
   Cheers,   
      
   --   
   Dave Abrahams   
   BoostPro Computing   
   http://www.boostpro.com   
      
      
    [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
    [ comp.lang.c++.moderated. First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|