From 7e3ae44bc28069d2c07d84db899649abf67efbc9 Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Mon, 10 Feb 2014 21:08:08 -0800 Subject: [PATCH] Fix use of size in make_shared for arrays --- include/boost/smart_ptr/make_shared_array.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/smart_ptr/make_shared_array.hpp b/include/boost/smart_ptr/make_shared_array.hpp index cfd390d..f98368a 100644 --- a/include/boost/smart_ptr/make_shared_array.hpp +++ b/include/boost/smart_ptr/make_shared_array.hpp @@ -25,7 +25,7 @@ namespace boost { T1* p1 = 0; T2* p2 = 0; D1 d1; - A1 a1(n1, &p2); + A1 a1(size, &p2); shared_ptr s1(p1, d1, a1); boost::detail::ms_init(p2, n1); A1* a2 = static_cast(s1._internal_get_untyped_deleter()); @@ -75,7 +75,7 @@ namespace boost { T2* p2 = 0; T3* p3 = reinterpret_cast(&value); D1 d1; - A1 a1(n1, &p2); + A1 a1(size, &p2); shared_ptr s1(p1, d1, a1); boost::detail::ms_init(p2, n1, p3); A1* a2 = static_cast(s1._internal_get_untyped_deleter()); @@ -122,7 +122,7 @@ namespace boost { T1* p1 = 0; T2* p2 = 0; D1 d1; - A1 a1(n1, &p2); + A1 a1(size, &p2); shared_ptr s1(p1, d1, a1); boost::detail::ms_noinit(p2, n1); A1* a2 = static_cast(s1._internal_get_untyped_deleter());