BAN: Make PlacementNew.h only include <new> if it exists
Otherwise it will define the functions itself. This allows compiling toolchain as stdlibc++ depends on BAN.
This commit is contained in:
parent
71563034a7
commit
f8ef11b4d2
|
@ -1,3 +1,10 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if __has_include(<new>)
|
||||||
#include <new>
|
#include <new>
|
||||||
|
#else
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
inline void* operator new(size_t, void* addr) { return addr; }
|
||||||
|
inline void* operator new[](size_t, void* addr) { return addr; }
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue