Home | History | Annotate | Download | only in include
      1 #ifndef __NEW__
      2 #define __NEW__
      3 
      4 #include <stddef.h>
      5 
      6 namespace std {
      7     using ::size_t;
      8 
      9     struct nothrow_t {};
     10     extern const nothrow_t nothrow;
     11 }
     12 
     13 void* operator new(std::size_t);
     14 void* operator new[](std::size_t);
     15 void  operator delete(void*);
     16 void  operator delete[](void*);
     17 void* operator new(std::size_t, const std::nothrow_t&);
     18 void* operator new[](std::size_t, const std::nothrow_t&);
     19 void  operator delete(void*, const std::nothrow_t&);
     20 void  operator delete[](void*, const std::nothrow_t&);
     21 
     22 inline void* operator new(std::size_t, void* p) { return p; }
     23 inline void* operator new[](std::size_t, void* p) { return p; }
     24 
     25 // these next two are not really required, since exceptions are off
     26 inline void  operator delete(void*, void*) { }
     27 inline void  operator delete[](void*, void*) { }
     28 
     29 #endif // __NEW__
     30