Provide-sized-global-delete-operators-when-compiled.patch 981 B

123456789101112131415161718192021222324252627282930313233343536
  1. From: Michal Kubecek <mkubecek@suse.cz>
  2. Date: Mon, 25 Apr 2016 08:55:36 +0200
  3. Subject: Provide sized global delete operators when compiled in C++14 mode
  4. Patch-mainline: submitted
  5. Git-commit: 038f9fbf559e56032e4cb49eb7ce4c3ead23fda9
  6. References: bsc#964466 CORE-5099
  7. ---
  8. src/common/classes/alloc.h | 10 ++++++++++
  9. 1 file changed, 10 insertions(+)
  10. diff --git a/src/common/classes/alloc.h b/src/common/classes/alloc.h
  11. index b1026ce2aac4..fda5bfebb0cc 100644
  12. --- a/src/common/classes/alloc.h
  13. +++ b/src/common/classes/alloc.h
  14. @@ -331,6 +331,16 @@ inline void operator delete[](void* mem, Firebird::MemoryPool& pool ALLOC_PARAMS
  15. MemoryPool::globalFree(mem);
  16. }
  17. +#if __cplusplus >= 201402L
  18. +inline void operator delete(void* mem, std::size_t s ALLOC_PARAMS) throw()
  19. +{
  20. + MemoryPool::globalFree(mem);
  21. +}
  22. +inline void operator delete[](void* mem, std::size_t s ALLOC_PARAMS) throw()
  23. +{
  24. + MemoryPool::globalFree(mem);
  25. +}
  26. +#endif
  27. #ifdef DEBUG_GDS_ALLOC
  28. #ifdef __clang__
  29. --
  30. 2.8.2