From 702ae47424522fc0ddce3ae0b1aaf3452a1c784d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Wed, 1 Oct 2014 00:01:41 +0200 Subject: [PATCH] Fixed #10469: Erasing from intrusive unordered_multiset with optimize_multikey goes into an infinite loop --- include/boost/intrusive/hashtable.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/intrusive/hashtable.hpp b/include/boost/intrusive/hashtable.hpp index eead5e2..872e572 100644 --- a/include/boost/intrusive/hashtable.hpp +++ b/include/boost/intrusive/hashtable.hpp @@ -253,7 +253,7 @@ struct group_functions if(group_algorithms::unique(first_in_group)) group_algorithms::link_after(first_in_group, n); else{ - group_algorithms::link_after(group_algorithms::node_traits::get_next(first_in_group), n); + group_algorithms::link_after(node_traits::get_next(first_in_group), n); } } else{ @@ -272,8 +272,8 @@ struct group_functions //It's the last in group if the next_node is a bucket slist_node_ptr nxt(node_traits::get_next(elem)); - bool last_in_group = (first_end_ptr <= nxt && nxt <= last_end_ptr)/* || - (group_traits::get_next(nxt) != elem)*/; + bool last_in_group = (first_end_ptr <= nxt && nxt <= last_end_ptr) || + (group_traits::get_next(detail::dcast_bucket_ptr(nxt)) != elem); //It's the first in group if group_previous's next_node is not //itself, as group list does not link bucket node_ptr prev_in_group(group_traits::get_next(elem));