Ticket #2073: slist::swap doesn't work properly under certain conditions

[SVN r47121]
This commit is contained in:
Ion Gaztañaga
2008-07-05 22:45:31 +00:00
parent 04883b48c3
commit cb7715bf44

View File

@@ -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);