summaryrefslogtreecommitdiffstats
path: root/Provide-sized-global-delete-operators-when-compiled.patch
blob: 1302d1dafe7b1134651593add53e4ed71c0f147e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From: Michal Kubecek <mkubecek@suse.cz>
Date: Mon, 25 Apr 2016 08:55:36 +0200
Subject: Provide sized global delete operators when compiled in C++14 mode
Patch-mainline: submitted
Git-commit: 038f9fbf559e56032e4cb49eb7ce4c3ead23fda9
References: bsc#964466 CORE-5099

---
 src/common/classes/alloc.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/common/classes/alloc.h b/src/common/classes/alloc.h
index b1026ce2aac4..fda5bfebb0cc 100644
--- a/src/common/classes/alloc.h
+++ b/src/common/classes/alloc.h
@@ -331,6 +331,16 @@ inline void operator delete[](void* mem, Firebird::MemoryPool& pool ALLOC_PARAMS
 	MemoryPool::globalFree(mem);
 }
 
+#if __cplusplus >= 201402L
+inline void operator delete(void* mem, std::size_t s ALLOC_PARAMS) throw()
+{
+	MemoryPool::globalFree(mem);
+}
+inline void operator delete[](void* mem, std::size_t s ALLOC_PARAMS) throw()
+{
+	MemoryPool::globalFree(mem);
+}
+#endif
 #ifdef DEBUG_GDS_ALLOC
 
 #ifdef __clang__
-- 
2.8.2