diff options
-rw-r--r-- | include/o3tl/make_unique.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/o3tl/make_unique.hxx b/include/o3tl/make_unique.hxx index 40658f5734d4..555e9ca538b8 100644 --- a/include/o3tl/make_unique.hxx +++ b/include/o3tl/make_unique.hxx @@ -23,7 +23,8 @@ namespace o3tl * Can be replaced by std::make_unique when we allow C++14. */ template<typename T, typename... Args> -typename std::unique_ptr<T> make_unique(Args&& ... args) +typename std::enable_if<!std::is_array<T>::value, std::unique_ptr<T>>::type +make_unique(Args&& ... args) { return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); } |