From 81378cdc449648c11f0364f6cdc51cc59fe6cdf2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Radovan=20=C4=8Cerven=C3=BD?= <radovan.cerveny@gmail.com>
Date: Mon, 18 Apr 2016 18:27:31 +0200
Subject: [PATCH] stealth_allocator fix #2

---
 alib2common/src/allocator/StealthAllocator.hpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/alib2common/src/allocator/StealthAllocator.hpp b/alib2common/src/allocator/StealthAllocator.hpp
index 7154aa5160..9926f10392 100644
--- a/alib2common/src/allocator/StealthAllocator.hpp
+++ b/alib2common/src/allocator/StealthAllocator.hpp
@@ -38,6 +38,15 @@ public:
 		operator delete( ptr, false );
 	}
 
+	void destroy ( pointer p ) {
+		p->~T ( );
+	}
+
+	template < class ... Args >
+	void construct ( pointer p, Args && ... args ) {
+		::new ( ( void * ) p )T ( std::forward < Args > ( args ) ... );
+	}
+
 };
 
 template < typename T, typename U >
-- 
GitLab