From 1968d17d2fbea19bb64d42e312632801df2e25f3 Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Wed, 12 Mar 2014 20:27:36 -0700 Subject: [PATCH] Use add_rvalue_reference in make_unique overload --- include/boost/smart_ptr/make_unique_object.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/smart_ptr/make_unique_object.hpp b/include/boost/smart_ptr/make_unique_object.hpp index c392e24..9e6108a 100644 --- a/include/boost/smart_ptr/make_unique_object.hpp +++ b/include/boost/smart_ptr/make_unique_object.hpp @@ -11,6 +11,7 @@ #include #include +#include #include namespace boost { @@ -30,7 +31,7 @@ namespace boost { template inline typename boost::detail::up_if_not_array::type - make_unique(T&& value) { + make_unique(typename add_rvalue_reference::type value) { return std::unique_ptr(new T(std::move(value))); }