Files
banan-os/BAN/include/BAN/PlacementNew.h
Bananymous f8ef11b4d2 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.
2024-11-19 00:16:44 +02:00

11 lines
220 B
C

#pragma once
#if __has_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