diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-07-14 08:52:33 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-11-29 07:51:35 +0100 |
commit | 386c2339d6306c0764fdd873adeb27b6c29cc0c2 (patch) | |
tree | c8ef2d9aa55ba9440792b9578b63d9ceed933c3a /include | |
parent | 3ee93fde188e8949125db2f73db37bc1e9149f5a (diff) |
Fix o3tl::make_unique
...after 3f20471490c61b19fe4222f8c40df255051f6e3d "use std::unique_ptr in
FlatFndBox: and extend o3tl::make_unique to cope with arrays"
Change-Id: I17a07d0be677aa4a5427be4a5c2f05ed8b675726
(cherry picked from commit 64d06e5f168ec498b2d5dda139263f56dfe9772d)
Diffstat (limited to 'include')
-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)...)); } |