diff --git include/boost/multi_index/hashed_index.hpp include/boost/multi_index/hashed_index.hpp index 436fecf..73202fe 100644 --- include/boost/multi_index/hashed_index.hpp +++ include/boost/multi_index/hashed_index.hpp @@ -1352,10 +1352,10 @@ private: std::size_t,allocator_type> hashes(get_allocator(),size()); auto_space< node_impl_pointer,allocator_type> node_ptrs(get_allocator(),size()); - std::size_t i=0; + std::size_t i=0, size_=size(); bool within_bucket=false; BOOST_TRY{ - for(;;++i){ + for(;i!=size_;++i){ node_impl_pointer x=end_->prior(); if(x==end_)break;