From bd9f607af438aa0d69b6bb406484d33ff4555cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sun, 23 Feb 2014 13:43:30 +0100 Subject: [PATCH] Fix wrong assertion when linear lists where used. --- include/boost/intrusive/slist.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/intrusive/slist.hpp b/include/boost/intrusive/slist.hpp index 51ab1bd..23c7824 100644 --- a/include/boost/intrusive/slist.hpp +++ b/include/boost/intrusive/slist.hpp @@ -1700,7 +1700,7 @@ class slist_impl //! Note: Iterators and references are not invalidated. iterator iterator_to(reference value) { - BOOST_INTRUSIVE_INVARIANT_ASSERT(!node_algorithms::inited(this->priv_value_traits().to_node_ptr(value))); + BOOST_INTRUSIVE_INVARIANT_ASSERT(linear || !node_algorithms::inited(this->priv_value_traits().to_node_ptr(value))); return iterator (this->priv_value_traits().to_node_ptr(value), this->value_traits_ptr()); } @@ -1715,7 +1715,7 @@ class slist_impl //! Note: Iterators and references are not invalidated. const_iterator iterator_to(const_reference value) const { - BOOST_INTRUSIVE_INVARIANT_ASSERT (!node_algorithms::inited(this->priv_value_traits().to_node_ptr(const_cast (value)))); + BOOST_INTRUSIVE_INVARIANT_ASSERT (linear || !node_algorithms::inited(this->priv_value_traits().to_node_ptr(const_cast (value)))); return const_iterator(this->priv_value_traits().to_node_ptr(const_cast (value)), this->value_traits_ptr()); }