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)