From be9837fd5480abbed56460e43ad8fd2e66361460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Tue, 23 Sep 2014 16:58:38 +0200 Subject: [PATCH] Fix multiple destructor bug, pointer was not incremented in ~scoped_destructor_n() --- include/boost/container/detail/destroyers.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/container/detail/destroyers.hpp b/include/boost/container/detail/destroyers.hpp index 0645895..ea9b617 100644 --- a/include/boost/container/detail/destroyers.hpp +++ b/include/boost/container/detail/destroyers.hpp @@ -204,7 +204,7 @@ struct scoped_destructor_n if(!m_p) return; value_type *raw_ptr = container_detail::to_raw_pointer(m_p); while(m_n--){ - AllocTraits::destroy(m_a, raw_ptr); + AllocTraits::destroy(m_a, raw_ptr++); } }