\r
extern "C++" {\r
\r
-namespace std \r
+class bad_alloc : public exception\r
{\r
- class bad_alloc : public exception \r
- {\r
- public:\r
- bad_alloc() throw() { }\r
+public:\r
+ bad_alloc(const char *name = "bad alloc") throw()\r
+ : exception(name) { }\r
\r
- // This declaration is not useless:\r
- // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118\r
- virtual ~bad_alloc() throw();\r
+ virtual ~bad_alloc() throw() { }\r
+};\r
\r
- // See comment in eh_exception.cc.\r
- virtual const char* what() const throw();\r
- };\r
+namespace std\r
+{\r
+ using ::bad_alloc;\r
\r
- struct nothrow_t { };\r
+ struct nothrow_t { };\r
\r
- extern const nothrow_t nothrow;\r
+ extern const nothrow_t nothrow;\r
} // namespace std\r
\r
typedef void (*new_handler)();\r
void operator delete[] (void* ptr) throw ();\r
void operator delete[] (void* ptr, const std::nothrow_t& nothrow_constant) throw();\r
inline void operator delete[] (void* ptr, void* voidptr2) throw() { }\r
-//@}\r
+\r
} // extern "C++"\r
\r
#endif\r