From 734b5d1354cec7a8076cc16ea45cadfcb1071c21 Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Wed, 7 Nov 2012 15:04:04 +0000 Subject: [PATCH] Update smart_ptr/detail/array_helper to have create and create_noinit for non-array case. [SVN r81231] --- include/boost/smart_ptr/detail/array_helper.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/smart_ptr/detail/array_helper.hpp b/include/boost/smart_ptr/detail/array_helper.hpp index 72b470c..96ecf1b 100644 --- a/include/boost/smart_ptr/detail/array_helper.hpp +++ b/include/boost/smart_ptr/detail/array_helper.hpp @@ -13,6 +13,14 @@ namespace boost { namespace detail { template struct array_helper { + static void create(T& value) { + void* p1 = &value; + ::new(p1) T(); + } + static void create_noinit(T& value) { + void* p1 = &value; + ::new(p1) T; + } static void destroy(T& value) { value.~T(); }