22 #include "CppUTestConfig.h" 25 #if CPPUTEST_USE_MEM_LEAK_DETECTION && defined(__cplusplus) 28 #ifndef CPPUTEST_USE_NEW_MACROS 30 #if CPPUTEST_USE_STD_CPP_LIB 36 void*
operator new(
size_t size,
const char* file,
int line) UT_THROW (std::bad_alloc);
37 void*
operator new[](
size_t size,
const char* file,
int line) UT_THROW (std::bad_alloc);
38 void*
operator new(
size_t size) UT_THROW(std::bad_alloc);
39 void*
operator new[](
size_t size) UT_THROW(std::bad_alloc);
41 void operator delete(
void* mem,
const char* file,
int line) UT_NOTHROW;
42 void operator delete[](
void* mem,
const char* file,
int line) UT_NOTHROW;
43 void operator delete(
void* mem) UT_NOTHROW;
44 void operator delete[](
void* mem) UT_NOTHROW;
45 void operator delete (
void* mem,
size_t size) UT_NOTHROW;
46 void operator delete[] (
void* mem,
size_t size) UT_NOTHROW;
52 #pragma clang diagnostic push 53 #if __clang_major__ >= 3 && __clang_minor__ >= 6 54 #pragma clang diagnostic ignored "-Wkeyword-macro" 58 #define new new(__FILE__, __LINE__) 61 #pragma clang diagnostic pop 64 #define CPPUTEST_USE_NEW_MACROS 1