BAN: Move placement new to its own file and fix includes

This commit is contained in:
Bananymous 2024-01-31 23:55:41 +02:00
parent 139bb5c2a5
commit 4273f43be1
9 changed files with 11 additions and 5 deletions

View File

@ -1,6 +1,7 @@
#pragma once
#include <BAN/Assert.h>
#include <BAN/PlacementNew.h>
#include <stdint.h>
#include <stddef.h>

View File

@ -2,7 +2,7 @@
#include <BAN/Errors.h>
#include <BAN/Move.h>
#include <BAN/New.h>
#include <BAN/PlacementNew.h>
namespace BAN
{

View File

@ -3,6 +3,7 @@
#include <BAN/Errors.h>
#include <BAN/Move.h>
#include <BAN/New.h>
#include <BAN/PlacementNew.h>
namespace BAN
{

View File

@ -16,6 +16,3 @@ namespace BAN
static constexpr void(&deallocator)(void*) = free;
#endif
}
inline void* operator new(size_t, void* addr) { return addr; }
inline void* operator new[](size_t, void* addr) { return addr; }

View File

@ -2,6 +2,7 @@
#include <BAN/Assert.h>
#include <BAN/Move.h>
#include <BAN/PlacementNew.h>
#include <stdint.h>

View File

@ -0,0 +1,4 @@
#pragma once
inline void* operator new(size_t, void* addr) { return addr; }
inline void* operator new[](size_t, void* addr) { return addr; }

View File

@ -5,6 +5,7 @@
#include <BAN/Math.h>
#include <BAN/Move.h>
#include <BAN/New.h>
#include <BAN/PlacementNew.h>
namespace BAN
{

View File

@ -3,7 +3,7 @@
#include <BAN/Assert.h>
#include <BAN/Math.h>
#include <BAN/Move.h>
#include <BAN/New.h>
#include <BAN/PlacementNew.h>
#include <string.h>

View File

@ -5,6 +5,7 @@
#include <BAN/Math.h>
#include <BAN/Move.h>
#include <BAN/New.h>
#include <BAN/PlacementNew.h>
#include <BAN/Span.h>
namespace BAN