/* * Acess2 C++ Library * - By John Hodge (thePowersGang) * * new (header) * - C++'s new operators */ #ifndef _LIBCXX_NEW_ #define _LIBCXX_NEW_ #include "cstddef" //extern void* operator new(size_t size) throw (::std::bad_alloc); //extern void* operator new(size_t size, const std::nothrow_t& nothrow_value) throw(); inline void* operator new(size_t /*size*/, void* ptr) throw() { return ptr; } //extern void* operator new[](size_t size) throw (::std::bad_alloc); //extern void* operator new[](size_t size, const std::nothrow_t& nothrow_value) throw(); inline void* operator new[](size_t /*size*/, void* ptr) throw() { return ptr; } #include "exception" namespace std { class bad_alloc: public ::std::exception { public: bad_alloc() noexcept; ~bad_alloc() noexcept; const char *what() const noexcept; }; } // namespace std #endif // vim: ft=cpp