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,259 of 33,346    |
|    Andy Lutomirski to nroberts    |
|    Re: Placement new myself    |
|    08 May 12 11:31:05    |
      4ffa570d       From: luto@amacapital.net              On 05/07/2012 07:41 PM, nroberts wrote:       > Someone asked a question with some really deranged code and I'm unable       > to find something in the standard that would indicate whether this       > would be defined or not:       >       > struct foo; // let's talk the generic case here. If there are       > specifics please explain       >       > foo f = foo();       >       > new (&f) foo(f);       >       > As I understand it, this will try to recreate f on top of itself with       > itself.       >       > My instinct says that this is likely undefined and in some cases is       > going to do absolutely absurd stuff...       >       >              It looks rather similar to this:              #include |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca