From dbea328b8b8d91ca0afb1d29ff3bb44a6c045de9 Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Wed, 7 Nov 2012 15:25:55 +0000 Subject: [PATCH] Don't treat array_helper create and create_noinit for array types as a special case. [SVN r81233] --- include/boost/smart_ptr/detail/array_helper.hpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/boost/smart_ptr/detail/array_helper.hpp b/include/boost/smart_ptr/detail/array_helper.hpp index 96ecf1b..1815f05 100644 --- a/include/boost/smart_ptr/detail/array_helper.hpp +++ b/include/boost/smart_ptr/detail/array_helper.hpp @@ -36,12 +36,12 @@ namespace boost { template struct array_helper { static void create(T value[N]) { - void* p1 = &value; - ::new(p1) T[N](); + array_helper::create(value); + array_helper::create(value[N-1]); } static void create_noinit(T value[N]) { - void* p1 = &value; - ::new(p1) T[N]; + array_helper::create_noinit(value, args); + array_helper::create_noinit(value[N-1], args); } static void destroy(T value[N]) { array_helper::destroy(value[N-1]); @@ -57,6 +57,10 @@ namespace boost { }; template struct array_helper { + static void create(T[]) { + } + static void create_noinit(T[]) { + } static void destroy(T[]) { } #if defined(BOOST_HAS_VARIADIC_TMPL) && defined(BOOST_HAS_RVALUE_REFS)