aboutsummaryrefslogtreecommitdiff
path: root/src/util/memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/memory.h')
-rw-r--r--src/util/memory.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/memory.h b/src/util/memory.h
index 15ecf8f80d..4d73b32869 100644
--- a/src/util/memory.h
+++ b/src/util/memory.h
@@ -10,10 +10,11 @@
#include <utility>
//! Substitute for C++14 std::make_unique.
+//! DEPRECATED use std::make_unique in new code.
template <typename T, typename... Args>
std::unique_ptr<T> MakeUnique(Args&&... args)
{
- return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
+ return std::make_unique<T>(std::forward<Args>(args)...);
}
#endif