Code snippet:
#include <new>
char buffer[512];
int main()
{
double *pd;
pd = new (buffer) double[5];
delete [] pd;
return 0;
}
This only hangs when using the placement new form of the new operator.
I'm using the following tools and options:
> cl -EHsc foobar.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.21005
Microsoft (R) Incremental Linker Version 12.00.21005.1