diff options
-rw-r--r-- | src/common/Common.h | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/common/Common.h b/src/common/Common.h index 78b7df6a895..3d853d05731 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -122,24 +122,7 @@ TC_COMMON_API LocaleConstant GetLocaleByName(std::string const& name); namespace Trinity { - //! std::make_unique implementation (TODO: remove this once C++14 is supported) - template<typename T, typename ...Args> - inline auto make_unique(Args&& ...args) -> - typename std::enable_if<!std::is_array<T>::value, std::unique_ptr<T>>::type - { - return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); - } - - template<typename T> - inline auto make_unique(std::size_t size) -> - typename std::enable_if<std::is_array<T>::value && std::extent<T>::value == 0, std::unique_ptr<T>>::type - { - return std::unique_ptr<T>(new typename std::remove_extent<T>::type[size]()); - } - - template<typename T, typename... Args> - inline auto make_unique(Args&&...) -> - typename std::enable_if<std::extent<T>::value != 0, void>::type = delete; + using std::make_unique; } #endif |