Opened 5 years ago

Closed 4 years ago

#13348 closed Bugs (duplicate)

splice does not work as expected

Reported by: gkorolev@… Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: container
Version: Boost 1.65.0 Severity: Problem
Keywords: slist container Cc:

Description

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 }

xref https://github.com/boostorg/container/pull/64

Change History (1)

comment:1 by Ion Gaztañaga, 4 years ago

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.