From 05605ec0b6d1f6f61edc7b932863692bfd2f125e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sat, 5 Jul 2008 22:45:36 +0000 Subject: [PATCH] Ticket #2073: slist::swap doesn't work properly under certain conditions [SVN r47122] --- include/boost/intrusive/detail/common_slist_algorithms.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/intrusive/detail/common_slist_algorithms.hpp b/include/boost/intrusive/detail/common_slist_algorithms.hpp index ada51a9..d837ad0 100644 --- a/include/boost/intrusive/detail/common_slist_algorithms.hpp +++ b/include/boost/intrusive/detail/common_slist_algorithms.hpp @@ -76,7 +76,7 @@ class common_slist_algorithms static void transfer_after(node_ptr p, node_ptr b, node_ptr e) { - if (p != b && p != e) { + if (p != b && p != e && b != e) { node_ptr next_b = NodeTraits::get_next(b); node_ptr next_e = NodeTraits::get_next(e); node_ptr next_p = NodeTraits::get_next(p);