aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Common.h
diff options
context:
space:
mode:
authorDuarte Duarte <dnpd.dd@gmail.com>2015-05-19 18:40:51 +0100
committerDuarte Duarte <dnpd.dd@gmail.com>2015-05-19 18:40:51 +0100
commit0778c4fd563e6f112e8c1bd5fed5fbf683e9a499 (patch)
tree467cd7cdc9f7b4cf33fceee922b67129c1708005 /src/server/shared/Common.h
parent547795ce3fc7a77e54d65fc9749cf8c06f436c4e (diff)
parentc6ab951025b0be3b0f64dc8bb0703d4aa8bdb003 (diff)
Merge pull request #14710 from et65/6.x
Core/PacketsIO: Implemented or updated most of party related packets.
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 dc9e948966d..e83340bdd84 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 <boost/optional.hpp>
#include <boost/utility/in_place_factory.hpp>
@@ -164,4 +165,14 @@ struct LocalizedString
template <typename T>
using Optional = boost::optional<T>;
+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