From 102696511a53e326a858a6d3c1bace827f40d728 Mon Sep 17 00:00:00 2001 From: Baptiste Wicht Date: Sun, 14 Aug 2016 22:02:38 +0200 Subject: [PATCH] Add std::make_unique --- tstl/include/unique_ptr.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tstl/include/unique_ptr.hpp b/tstl/include/unique_ptr.hpp index b452b5b2..9e67e6ce 100644 --- a/tstl/include/unique_ptr.hpp +++ b/tstl/include/unique_ptr.hpp @@ -198,6 +198,11 @@ public: static_assert(sizeof(unique_ptr) == sizeof(long), "unique_ptr must have zero overhead with default deleter"); static_assert(sizeof(unique_ptr) == sizeof(long), "unique_ptr must have zero overhead with default deleter"); +template +std::unique_ptr make_unique(Args&&... args){ + return std::unique_ptr(std::forward(args)...); +} + } //end of namespace std #endif