mirror of
https://github.com/boostorg/container.git
synced 2025-08-03 06:24:26 +02:00
Last merge for 1.55 (Container)
[SVN r85704]
This commit is contained in:
@@ -720,8 +720,10 @@ use [*Boost.Container]? There are several reasons for that:
|
|||||||
* Fixed bugs [@https://svn.boost.org/trac/boost/ticket/8269 #8269],
|
* Fixed bugs [@https://svn.boost.org/trac/boost/ticket/8269 #8269],
|
||||||
[@https://svn.boost.org/trac/boost/ticket/8473 #8473],
|
[@https://svn.boost.org/trac/boost/ticket/8473 #8473],
|
||||||
[@https://svn.boost.org/trac/boost/ticket/8892 #8892],
|
[@https://svn.boost.org/trac/boost/ticket/8892 #8892],
|
||||||
[@https://svn.boost.org/trac/boost/ticket/9064 #9064].
|
[@https://svn.boost.org/trac/boost/ticket/9009 #9009],
|
||||||
[@https://svn.boost.org/trac/boost/ticket/9092 #9092].
|
[@https://svn.boost.org/trac/boost/ticket/9064 #9064],
|
||||||
|
[@https://svn.boost.org/trac/boost/ticket/9092 #9092],
|
||||||
|
[@https://svn.boost.org/trac/boost/ticket/9108 #9108].
|
||||||
|
|
||||||
[endsect]
|
[endsect]
|
||||||
|
|
||||||
|
@@ -1301,7 +1301,7 @@ class deque : protected deque_base<Allocator>
|
|||||||
//! Linear time otherwise.
|
//! Linear time otherwise.
|
||||||
iterator insert(const_iterator position, T &&x);
|
iterator insert(const_iterator position, T &&x);
|
||||||
#else
|
#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
|
#endif
|
||||||
|
|
||||||
//! <b>Requires</b>: pos must be a valid iterator of *this.
|
//! <b>Requires</b>: pos must be a valid iterator of *this.
|
||||||
|
@@ -512,7 +512,7 @@ class flat_set
|
|||||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||||
iterator insert(const_iterator position, value_type &&x);
|
iterator insert(const_iterator position, value_type &&x);
|
||||||
#else
|
#else
|
||||||
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator)
|
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//! <b>Requires</b>: first, last are not iterators into *this.
|
//! <b>Requires</b>: first, last are not iterators into *this.
|
||||||
@@ -1189,7 +1189,7 @@ class flat_multiset
|
|||||||
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
//! <b>Note</b>: If an element is inserted it might invalidate elements.
|
||||||
iterator insert(const_iterator position, value_type &&x);
|
iterator insert(const_iterator position, value_type &&x);
|
||||||
#else
|
#else
|
||||||
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator)
|
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//! <b>Requires</b>: first, last are not iterators into *this.
|
//! <b>Requires</b>: first, last are not iterators into *this.
|
||||||
|
@@ -777,7 +777,7 @@ class list
|
|||||||
//! <b>Complexity</b>: Amortized constant time.
|
//! <b>Complexity</b>: Amortized constant time.
|
||||||
iterator insert(const_iterator position, T &&x);
|
iterator insert(const_iterator position, T &&x);
|
||||||
#else
|
#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
|
#endif
|
||||||
|
|
||||||
//! <b>Requires</b>: p must be a valid iterator of *this.
|
//! <b>Requires</b>: p must be a valid iterator of *this.
|
||||||
|
@@ -457,7 +457,7 @@ class set
|
|||||||
//! <b>Complexity</b>: Logarithmic.
|
//! <b>Complexity</b>: Logarithmic.
|
||||||
iterator insert(const_iterator position, value_type &&x);
|
iterator insert(const_iterator position, value_type &&x);
|
||||||
#else
|
#else
|
||||||
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator)
|
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//! <b>Requires</b>: first, last are not iterators into *this.
|
//! <b>Requires</b>: first, last are not iterators into *this.
|
||||||
@@ -1077,7 +1077,7 @@ class multiset
|
|||||||
//! is inserted right before p.
|
//! is inserted right before p.
|
||||||
iterator insert(const_iterator position, value_type &&x);
|
iterator insert(const_iterator position, value_type &&x);
|
||||||
#else
|
#else
|
||||||
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator)
|
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//! <b>Requires</b>: first, last are not iterators into *this.
|
//! <b>Requires</b>: first, last are not iterators into *this.
|
||||||
|
@@ -753,7 +753,7 @@ class slist
|
|||||||
//! previous values.
|
//! previous values.
|
||||||
iterator insert_after(const_iterator prev_pos, T &&x);
|
iterator insert_after(const_iterator prev_pos, T &&x);
|
||||||
#else
|
#else
|
||||||
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert_after, T, iterator, priv_insert_after, const_iterator)
|
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert_after, T, iterator, priv_insert_after, const_iterator, const_iterator)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//! <b>Requires</b>: prev_pos must be a valid iterator of *this.
|
//! <b>Requires</b>: prev_pos must be a valid iterator of *this.
|
||||||
@@ -1266,7 +1266,7 @@ class slist
|
|||||||
//! <b>Complexity</b>: Linear to the elements before p.
|
//! <b>Complexity</b>: Linear to the elements before p.
|
||||||
iterator insert(const_iterator prev_pos, T &&x);
|
iterator insert(const_iterator prev_pos, T &&x);
|
||||||
#else
|
#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
|
#endif
|
||||||
|
|
||||||
//! <b>Requires</b>: p must be a valid iterator of *this.
|
//! <b>Requires</b>: p must be a valid iterator of *this.
|
||||||
|
@@ -1306,7 +1306,7 @@ class stable_vector
|
|||||||
//! Linear time otherwise.
|
//! Linear time otherwise.
|
||||||
iterator insert(const_iterator position, T &&x);
|
iterator insert(const_iterator position, T &&x);
|
||||||
#else
|
#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
|
#endif
|
||||||
|
|
||||||
//! <b>Requires</b>: pos must be a valid iterator of *this.
|
//! <b>Requires</b>: pos must be a valid iterator of *this.
|
||||||
|
@@ -1347,7 +1347,7 @@ class vector
|
|||||||
//! Linear time otherwise.
|
//! Linear time otherwise.
|
||||||
iterator insert(const_iterator position, T &&x);
|
iterator insert(const_iterator position, T &&x);
|
||||||
#else
|
#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
|
#endif
|
||||||
|
|
||||||
//! <b>Requires</b>: p must be a valid iterator of *this.
|
//! <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;
|
const size_type sz = m_holder.m_size;
|
||||||
::boost::container::uninitialized_move_alloc_n_source
|
::boost::container::uninitialized_move_alloc_n_source
|
||||||
( this->m_holder.alloc(), raw_beg, sz, container_detail::to_raw_pointer(p) );
|
( this->m_holder.alloc(), raw_beg, sz, container_detail::to_raw_pointer(p) );
|
||||||
|
if(this->m_holder.capacity()){
|
||||||
|
if(!value_traits::trivial_dctr_after_move)
|
||||||
boost::container::destroy_alloc_n(this->m_holder.alloc(), raw_beg, sz);
|
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.start(p);
|
||||||
this->m_holder.capacity(new_cap);
|
this->m_holder.capacity(new_cap);
|
||||||
}
|
}
|
||||||
@@ -1677,7 +1681,6 @@ class vector
|
|||||||
}
|
}
|
||||||
//New buffer
|
//New buffer
|
||||||
else{
|
else{
|
||||||
//Backwards (and possibly forward) expansion
|
|
||||||
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
||||||
++this->num_alloc;
|
++this->num_alloc;
|
||||||
#endif
|
#endif
|
||||||
@@ -1685,7 +1688,11 @@ class vector
|
|||||||
const size_type sz = m_holder.m_size;
|
const size_type sz = m_holder.m_size;
|
||||||
::boost::container::uninitialized_move_alloc_n_source
|
::boost::container::uninitialized_move_alloc_n_source
|
||||||
( this->m_holder.alloc(), raw_beg, sz, container_detail::to_raw_pointer(ret.first) );
|
( this->m_holder.alloc(), raw_beg, sz, container_detail::to_raw_pointer(ret.first) );
|
||||||
|
if(this->m_holder.capacity()){
|
||||||
|
if(!value_traits::trivial_dctr_after_move)
|
||||||
boost::container::destroy_alloc_n(this->m_holder.alloc(), raw_beg, sz);
|
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.start(ret.first);
|
||||||
this->m_holder.capacity(real_cap);
|
this->m_holder.capacity(real_cap);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user