From cfc5a20b4a6dcdab9170d82f59a20aafc8ff6245 Mon Sep 17 00:00:00 2001 From: Sebastian Ullrich Date: Tue, 24 May 2016 08:57:34 -0400 Subject: [PATCH] fix(util/memory): add C++14 sized delete operators Fixes #1044 --- src/util/memory.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/memory.cpp b/src/util/memory.cpp index d569d2135..715df082c 100644 --- a/src/util/memory.cpp +++ b/src/util/memory.cpp @@ -193,4 +193,8 @@ void* operator new[](std::size_t sz) throw(std::bad_alloc) { return lean::malloc void operator delete[](void * ptr) throw() { return lean::free(ptr); } void* operator new(std::size_t sz, std::nothrow_t const &) noexcept { return lean::malloc(sz, false); } void* operator new[](std::size_t sz, std::nothrow_t const &) noexcept { return lean::malloc(sz, false); } + +#pragma GCC diagnostic ignored "-Wc++14-compat" +void operator delete(void * ptr, size_t _size) throw() { return lean::free(ptr); } +void operator delete[](void * ptr, size_t _size) throw() { return lean::free(ptr); } #endif