| Niko Catania | 69b1a8a | 2009-04-10 10:54:03 -0700 | [diff] [blame^] | 1 | /* -*- c++ -*- */ | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 2 | #ifndef __NEW__ | 
|  | 3 | #define __NEW__ | 
|  | 4 |  | 
| Niko Catania | 69b1a8a | 2009-04-10 10:54:03 -0700 | [diff] [blame^] | 5 | #include <cstddef> | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 6 |  | 
|  | 7 | namespace std { | 
| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 8 | struct nothrow_t {}; | 
|  | 9 | extern const nothrow_t nothrow; | 
|  | 10 | } | 
|  | 11 |  | 
|  | 12 | void* operator new(std::size_t); | 
|  | 13 | void* operator new[](std::size_t); | 
|  | 14 | void  operator delete(void*); | 
|  | 15 | void  operator delete[](void*); | 
|  | 16 | void* operator new(std::size_t, const std::nothrow_t&); | 
|  | 17 | void* operator new[](std::size_t, const std::nothrow_t&); | 
|  | 18 | void  operator delete(void*, const std::nothrow_t&); | 
|  | 19 | void  operator delete[](void*, const std::nothrow_t&); | 
|  | 20 |  | 
|  | 21 | inline void* operator new(std::size_t, void* p) { return p; } | 
|  | 22 | inline void* operator new[](std::size_t, void* p) { return p; } | 
|  | 23 |  | 
|  | 24 | // these next two are not really required, since exceptions are off | 
|  | 25 | inline void  operator delete(void*, void*) { } | 
|  | 26 | inline void  operator delete[](void*, void*) { } | 
|  | 27 |  | 
|  | 28 | #endif // __NEW__ |