Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 32,148 of 33,346    |
|    Dave Harris to Mathias Gaunard    |
|    Re: allocate memory 'inside' POD    |
|    16 Apr 12 07:07:29    |
   
   59d7b62f   
   From: brangdon@cix.compulink.co.uk   
      
   loufoque@gmail.com (Mathias Gaunard) wrote (abridged):   
   > In practice, in terms of underlying semantics, static_cast,   
   > const_cast, reinterpret_cast and C-style cast all do the same thing.   
   > The C++ style casts are only useful to make what you're doing more   
   > explicit and protect against pointer casts you don't really mean to   
   > do.   
      
   I don't think that's true, in general. For example:   
    struct Base1 { int x; };   
    struct Base2 { int x; };   
    struct Derived: Base1, Base2 {};   
      
    Derived d;   
    Base2 *p2r = reinterpret_cast
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca