boostorg / container

STL-like containers from Boost
http://www.boost.org/libs/container/
Boost Software License 1.0
101 stars 113 forks source link

Fix splice for slist #64

Closed QUvalda closed 6 years ago

QUvalda commented 6 years ago

The call of the splice method with iterators leads to an infinite loop inside common_slist_algorithms::get_previous_node

slist lst1 = { 0, 1, 2, 3 }; slist lst2; lst2.splice(lst2.begin(), lst1, lst1.begin());

expected: lst1 == { 1, 2, 3 } lst2 == { 0 }

QUvalda commented 6 years ago

xref https://svn.boost.org/trac10/ticket/13348

igaztanaga commented 6 years ago

Fixed cherry-picking commit:

https://github.com/boostorg/container/commit/ed6c8bd87d95eb8be54e133c901a50b5bcbbc288

Many thanks for the report.