Last merge for 1.55 (Container)

[SVN r85704]
This commit is contained in:
Ion Gaztañaga
2013-09-16 17:00:22 +00:00
parent 772b568187
commit a52d0b92cc
8 changed files with 24 additions and 15 deletions
+11 -4
View File
@@ -1347,7 +1347,7 @@ class vector
//! Linear time otherwise.
iterator insert(const_iterator position, T &&x);
#else
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator)
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator)
#endif
//! <b>Requires</b>: p must be a valid iterator of *this.
@@ -1634,7 +1634,11 @@ class vector
const size_type sz = m_holder.m_size;
::boost::container::uninitialized_move_alloc_n_source
( this->m_holder.alloc(), raw_beg, sz, container_detail::to_raw_pointer(p) );
boost::container::destroy_alloc_n(this->m_holder.alloc(), raw_beg, sz);
if(this->m_holder.capacity()){
if(!value_traits::trivial_dctr_after_move)
boost::container::destroy_alloc_n(this->m_holder.alloc(), raw_beg, sz);
this->m_holder.deallocate(this->m_holder.start(), this->m_holder.capacity());
}
this->m_holder.start(p);
this->m_holder.capacity(new_cap);
}
@@ -1677,7 +1681,6 @@ class vector
}
//New buffer
else{
//Backwards (and possibly forward) expansion
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
++this->num_alloc;
#endif
@@ -1685,7 +1688,11 @@ class vector
const size_type sz = m_holder.m_size;
::boost::container::uninitialized_move_alloc_n_source
( this->m_holder.alloc(), raw_beg, sz, container_detail::to_raw_pointer(ret.first) );
boost::container::destroy_alloc_n(this->m_holder.alloc(), raw_beg, sz);
if(this->m_holder.capacity()){
if(!value_traits::trivial_dctr_after_move)
boost::container::destroy_alloc_n(this->m_holder.alloc(), raw_beg, sz);
this->m_holder.deallocate(this->m_holder.start(), this->m_holder.capacity());
}
this->m_holder.start(ret.first);
this->m_holder.capacity(real_cap);
}