summaryrefslogtreecommitdiff
path: root/src/libc_override.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libc_override.h')
-rw-r--r--src/libc_override.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libc_override.h b/src/libc_override.h
index c01a97c..7f9cd91 100644
--- a/src/libc_override.h
+++ b/src/libc_override.h
@@ -58,6 +58,14 @@
#endif
#include <gperftools/tcmalloc.h>
+#if __cplusplus >= 201103L
+#define CPP_NOTHROW noexcept
+#define CPP_BADALLOC
+#else
+#define CPP_NOTHROW throw()
+#define CPP_BADALLOC throw(std::bad_alloc)
+#endif
+
static void ReplaceSystemAlloc(); // defined in the .h files below
// For windows, there are two ways to get tcmalloc. If we're