/* Copyright 10/16/98 Sun Microsystems, Inc. All Rights Reserved */ /* new @(#)new 1.5 10/16/98 17:01:24 Declaration for ISO standard new and delete interface */ #if !defined(_NEW_HDR) #define _NEW_HDR #include #include namespace std { class bad_alloc : public exception { public: bad_alloc () throw() { } bad_alloc(const bad_alloc&) throw() { } bad_alloc& operator=(const bad_alloc&) throw() {return *this;} ~bad_alloc () throw() { } const char* what() const throw(); }; struct nothrow_t {}; extern const nothrow_t nothrow; typedef void (*new_handler) (); extern new_handler set_new_handler(new_handler new_p) throw(); } void* operator new(size_t) throw(std::bad_alloc); void* operator new(size_t, const std::nothrow_t&) throw(); void operator delete(void*) throw(); void operator delete(void*, const std::nothrow_t&) throw(); void* operator new[](size_t) throw(std::bad_alloc); void* operator new[](size_t, const std::nothrow_t&) throw(); void operator delete[](void*) throw(); void operator delete[](void*, const std::nothrow_t&) throw(); inline void* operator new[] ( size_t, void* __ptr) throw() { return __ptr; } inline void *operator new(size_t, void* __ptr) throw() { return __ptr; } inline void operator delete (void*, void*) throw() {} inline void operator delete[](void*, void*) throw() {} #endif // _NEW_HDR