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>
#ifdef KALEIDOSCOPE_VIRTUAL_BUILD
#include <new>
#else
// To enable placement new, we need to supply a global operator
// function.
//
inline void* operator new (size_t, void* __p) throw() {
return __p;
}
#endif
namespace kaleidoscope {

Loading…
Cancel
Save