forked from boostorg/intrusive
x's cache_last was not updated when splicing the whole container
[SVN r45565]
This commit is contained in:
@@ -1015,9 +1015,12 @@ class slist_impl
|
||||
iterator last_x(x.previous(x.end())); //<- constant time if cache_last is active
|
||||
node_ptr prev_n(prev.pointed_node());
|
||||
node_ptr last_x_n(last_x.pointed_node());
|
||||
if(cache_last && node_traits::get_next(prev_n) == this->get_end_node()){
|
||||
if(cache_last){
|
||||
x.set_last_node(x.get_root_node());
|
||||
if(node_traits::get_next(prev_n) == this->get_end_node()){
|
||||
this->set_last_node(last_x_n);
|
||||
}
|
||||
}
|
||||
node_algorithms::transfer_after( prev_n, x.before_begin().pointed_node(), last_x_n);
|
||||
this->priv_size_traits().set_size(this->priv_size_traits().get_size() + x.priv_size_traits().get_size());
|
||||
x.priv_size_traits().set_size(size_type(0));
|
||||
|
Reference in New Issue
Block a user