aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNaios <naios-dev@live.de>2017-12-08 04:01:58 +0100
committerNaios <naios-dev@live.de>2017-12-17 20:22:34 +0100
commitca023fd60aa7e75987c93b776c309e0d81931bd8 (patch)
tree67d50b9235e0f5b7eb1b0602b33fdcaddf7c5517 /src
parentb4a42d1d06922d0359b8a3a102aeb10490605581 (diff)
Core/Common: Use the std make_unique instead of a custom one
Diffstat (limited to 'src')
-rw-r--r--src/common/Common.h19
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