diff options
Diffstat (limited to 'src/server/shared/Common.h')
| -rw-r--r-- | src/server/shared/Common.h | 11 |
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 |
