On Fri, Oct 21, 2016 at 12:44:39PM +0100, Jonathan Wakely wrote: > On 21/10/16 14:36 +0300, Gleb Natapov wrote: > > On Thu, Oct 20, 2016 at 11:53:49PM -0400, Ryan Burn wrote: > > > Are exception classes required to support emplace new construction > > > like that? With this change, Intel's TBB library no longer compiles > > > because its exception class declares it's own new operator (see > > > https://github.com/wjakob/tbb/blob/master/include/tbb/tbb_exception.h): > > > > > Can you test this patch please: > > That doesn't help, the overloaded new still prevents placement new. > Dammit. > Hmm, are you sure. This program compiles for me (while fails without ::):
#include<new> #include <stdlib.h> struct S { void* operator new (unsigned long size); }; main() { void* p = malloc(sizeof(S)); ::new(p) S(); } -- Gleb.