aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Common.h
diff options
context:
space:
mode:
authoret65 <et65@ashbringer.fr>2015-07-22 02:15:56 +0200
committerNaios <naios-dev@live.de>2015-07-22 02:18:18 +0200
commitb0255927f0c35f4c27d96ed79787d62811b23378 (patch)
treeea77a50312de82e6e6c112ce509a59bd8f0cea52 /src/server/shared/Common.h
parent09d34e0a9bc436cc90b85e101af4a1f7039751fb (diff)
Core/Logging: Partial cherry-pick from commit c6ab951025b0be3b0f6
* solves differences 3.3.5 <-> 6.x because of make_unique workarround. (cherry picked from commit c6ab951025b0be3b0f64dc8bb0703d4aa8bdb003) Signed-off-by: Naios <naios-dev@live.de>
Diffstat (limited to 'src/server/shared/Common.h')
-rw-r--r--src/server/shared/Common.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/server/shared/Common.h b/src/server/shared/Common.h
index dc4a4d231b1..09d64acc795 100644
--- a/src/server/shared/Common.h
+++ b/src/server/shared/Common.h
@@ -38,6 +38,7 @@
#include <queue>
#include <sstream>
#include <algorithm>
+#include <memory>
#include "Debugging/Errors.h"
@@ -144,4 +145,14 @@ typedef std::vector<std::string> StringVector;
#define MAX_QUERY_LEN 32*1024
+namespace Trinity
+{
+ //! std::make_unique implementation (TODO: remove this once C++14 is supported)
+ template<typename T, typename ...Args>
+ std::unique_ptr<T> make_unique(Args&& ...args)
+ {
+ return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
+ }
+}
+
#endif