diff --git a/include/boost/container/detail/copy_move_algo.hpp b/include/boost/container/detail/copy_move_algo.hpp index 968f4ac..9044960 100644 --- a/include/boost/container/detail/copy_move_algo.hpp +++ b/include/boost/container/detail/copy_move_algo.hpp @@ -963,7 +963,8 @@ template inline typename container_detail::disable_if_trivially_destructible::type destroy_alloc_n(Allocator &a, I f, U n) { - while(n--){ + while(n){ + --n; allocator_traits::destroy(a, boost::movelib::iterator_to_raw_pointer(f)); ++f; }