From 0781f3a8c93e03641f9b27eb948763930aef0e3f Mon Sep 17 00:00:00 2001 From: Xu Ning Date: Fri, 24 May 2013 16:02:12 -0700 Subject: [PATCH] make folly:make_unique support customized deleter Summary: just follow the same template arguments as unique_ptr Test Plan: compile Reviewed By: marcelo.juchem@fb.com FB internal diff: D825025 --- folly/Memory.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/folly/Memory.h b/folly/Memory.h index 0b6c0a11..6ce239f4 100644 --- a/folly/Memory.h +++ b/folly/Memory.h @@ -34,11 +34,12 @@ namespace folly { * we have std::make_unique(). * * @author Louis Brandy (ldbrandy@fb.com) + * @author Xu Ning (xning@fb.com) */ -template -std::unique_ptr make_unique(Args&&... args) { - return std::unique_ptr(new T(std::forward(args)...)); +template, typename... Args> +std::unique_ptr make_unique(Args&&... args) { + return std::unique_ptr(new T(std::forward(args)...)); } /** -- 2.34.1