Unverified Commit c72907c4 authored by Sergiu Deitsch's avatar Sergiu Deitsch Committed by GitHub

Merge pull request #332 from NeroBurner/fix_cxx17_throws

tests: fix compilation with C++17
parents 0301bfdd 5fa1d590
...@@ -578,21 +578,21 @@ void (*g_new_hook)() = NULL; ...@@ -578,21 +578,21 @@ void (*g_new_hook)() = NULL;
_END_GOOGLE_NAMESPACE_ _END_GOOGLE_NAMESPACE_
void* operator new(size_t size) throw(std::bad_alloc) { void* operator new(size_t size) {
if (GOOGLE_NAMESPACE::g_new_hook) { if (GOOGLE_NAMESPACE::g_new_hook) {
GOOGLE_NAMESPACE::g_new_hook(); GOOGLE_NAMESPACE::g_new_hook();
} }
return malloc(size); return malloc(size);
} }
void* operator new[](size_t size) throw(std::bad_alloc) { void* operator new[](size_t size) {
return ::operator new(size); return ::operator new(size);
} }
void operator delete(void* p) throw() { void operator delete(void* p) {
free(p); free(p);
} }
void operator delete[](void* p) throw() { void operator delete[](void* p) {
::operator delete(p); ::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