Ticket #7471: erase-1.51.patch

File erase-1.51.patch, 1.7 KB (added by Daniel James, 10 years ago)

Updated patch for 1.51

  • boost/unordered/detail/buckets.hpp

     
    892892            {
    893893                for(;;) {
    894894                    n = static_cast<node_pointer>(n->next_);
    895                     if (n == end) return;
     895                    if (n == end) {
     896                        if (n) {
     897                            std::size_t new_bucket_index =
     898                                policy::to_bucket(bucket_count_, n->hash_);
     899                            if (bucket_index != new_bucket_index) {
     900                                get_bucket(new_bucket_index)->next_ = prev;
     901                            }
     902                        }
     903                        return;
     904                    }
    896905   
    897906                    std::size_t new_bucket_index =
    898907                        policy::to_bucket(this->bucket_count_, n->hash_);
  • boost/unordered/detail/equivalent.hpp

     
    722722
    723723                    if(begin == group2) {
    724724                        link_pointer end1 = group1->group_prev_;
    725                         link_pointer end2 = group2->group_prev_;
     725                        link_pointer end2 = end->group_prev_;
    726726                        group1->group_prev_ = end2;
    727                         group2->group_prev_ = end1;
     727                        end->group_prev_ = end1;
    728728                    }
    729729                }
    730730            }