fix(util/memory): add C++14 sized delete operators

Fixes #1044
This commit is contained in:
Sebastian Ullrich 2016-05-24 08:57:34 -04:00 committed by Leonardo de Moura
parent 371638a628
commit cfc5a20b4a

View file

@ -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