Skip to content

Commit

Permalink
Merge pull request #332 from NeroBurner/fix_cxx17_throws
Browse files Browse the repository at this point in the history
tests: fix compilation with C++17
  • Loading branch information
sergiud authored Jun 21, 2018
2 parents 0301bfd + 5fa1d59 commit c72907c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/googletest.h
Original file line number Diff line number Diff line change
Expand Up @@ -578,21 +578,21 @@ void (*g_new_hook)() = NULL;

_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) {
GOOGLE_NAMESPACE::g_new_hook();
}
return malloc(size);
}

void* operator new[](size_t size) throw(std::bad_alloc) {
void* operator new[](size_t size) {
return ::operator new(size);
}

void operator delete(void* p) throw() {
void operator delete(void* p) {
free(p);
}

void operator delete[](void* p) throw() {
void operator delete[](void* p) {
::operator delete(p);
}

0 comments on commit c72907c

Please sign in to comment.