Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
eastl.h
1 #pragma once
2 
3 #include <EABase/eabase.h>
4 #include <stddef.h>
5 #include <new>
6 
8 // throw specification wrappers, which allow for portability.
10 
11 #define EA_COMPILER_NO_EXCEPTIONS
12 
13 #if defined(EA_COMPILER_NO_EXCEPTIONS) && (!defined(__MWERKS__) || defined(_MSL_NO_THROW_SPECS)) && !defined(EA_COMPILER_RVCT)
14 #define THROW_SPEC_0 // Throw 0 arguments
15 #define THROW_SPEC_1(x) // Throw 1 argument
16 #else
17 #define THROW_SPEC_0 throw()
18 #define THROW_SPEC_1(x) throw(x)
19 #endif
20 
21 
23 // operator new used by EASTL
25 
26 void* operator new[](size_t size, const char* /*name*/, int /*flags*/,
27  unsigned /*debugFlags*/, const char* /*file*/, int /*line*/) THROW_SPEC_1(std::bad_alloc);
28 
29 void* operator new[](size_t size, size_t alignment, size_t alignmentOffset, const char* /*name*/,
30  int flags, unsigned /*debugFlags*/, const char* /*file*/, int /*line*/) THROW_SPEC_1(std::bad_alloc);
31 
32 
33 
35 // Other operator new as typically required by applications.
37 
38 void* operator new(size_t size) THROW_SPEC_1(std::bad_alloc);
39 
40 
41 void* operator new[](size_t size) THROW_SPEC_1(std::bad_alloc);
42 
43 
45 // Operator delete, which is shared between operator new implementations.
47 
48 void operator delete(void* p) THROW_SPEC_0;
49 
50 
51 void operator delete[](void* p) THROW_SPEC_0;