Commit cd026f9e authored by 's avatar

Add exception specification for operator new and operator delete

Unfortunately, clang produces warnings for them



git-svn-id: https://google-glog.googlecode.com/svn/trunk@106 eb4d4688-79bd-11dd-afb4-1d65580434c0
parent 8b90f057
......@@ -584,21 +584,21 @@ void (*g_new_hook)() = NULL;
_END_GOOGLE_NAMESPACE_
void* operator new(size_t size) {
void* operator new(size_t size) throw(std::bad_alloc) {
if (GOOGLE_NAMESPACE::g_new_hook) {
GOOGLE_NAMESPACE::g_new_hook();
}
return malloc(size);
}
void* operator new[](size_t size) {
void* operator new[](size_t size) throw(std::bad_alloc) {
return ::operator new(size);
}
void operator delete(void* p) {
void operator delete(void* p) throw() {
free(p);
}
void operator delete[](void* p) {
void operator delete[](void* p) throw() {
::operator delete(p);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment