Fixed new operator for use with virtual build

In Virtual builds the explicitly defined new operator
collides with that of the standard library. To fix
this, we make the standard library version available.

Signed-off-by: Florian Fleissner <florian.fleissner@inpartik.de>
pull/640/head
Florian Fleissner 6 years ago committed by Jesse Vincent
parent 67567d0d21
commit 4feb140d8c

@ -23,12 +23,17 @@
#include <stddef.h> #include <stddef.h>
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include <new>
#else
// To enable placement new, we need to supply a global operator // To enable placement new, we need to supply a global operator
// function. // function.
// //
inline void* operator new (size_t, void* __p) throw() { inline void* operator new (size_t, void* __p) throw() {
return __p; return __p;
} }
#endif
namespace kaleidoscope { namespace kaleidoscope {

Loading…
Cancel
Save