|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r85704 - in branches/release: boost/container libs/container/doc
From: igaztanaga_at_[hidden]
Date: 2013-09-16 13:00:22
Author: igaztanaga
Date: 2013-09-16 13:00:22 EDT (Mon, 16 Sep 2013)
New Revision: 85704
URL: http://svn.boost.org/trac/boost/changeset/85704
Log:
Last merge for 1.55 (Container)
Text files modified:
branches/release/boost/container/deque.hpp | 2 +-
branches/release/boost/container/flat_set.hpp | 4 ++--
branches/release/boost/container/list.hpp | 2 +-
branches/release/boost/container/set.hpp | 4 ++--
branches/release/boost/container/slist.hpp | 4 ++--
branches/release/boost/container/stable_vector.hpp | 2 +-
branches/release/boost/container/vector.hpp | 15 +++++++++++----
branches/release/libs/container/doc/container.qbk | 6 ++++--
8 files changed, 24 insertions(+), 15 deletions(-)
Modified: branches/release/boost/container/deque.hpp
==============================================================================
--- branches/release/boost/container/deque.hpp Mon Sep 16 12:59:29 2013 (r85703)
+++ branches/release/boost/container/deque.hpp 2013-09-16 13:00:22 EDT (Mon, 16 Sep 2013) (r85704)
@@ -1301,7 +1301,7 @@
//! 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>: pos must be a valid iterator of *this.
Modified: branches/release/boost/container/flat_set.hpp
==============================================================================
--- branches/release/boost/container/flat_set.hpp Mon Sep 16 12:59:29 2013 (r85703)
+++ branches/release/boost/container/flat_set.hpp 2013-09-16 13:00:22 EDT (Mon, 16 Sep 2013) (r85704)
@@ -512,7 +512,7 @@
//! <b>Note</b>: If an element is inserted it might invalidate elements.
iterator insert(const_iterator position, value_type &&x);
#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
//! <b>Requires</b>: first, last are not iterators into *this.
@@ -1189,7 +1189,7 @@
//! <b>Note</b>: If an element is inserted it might invalidate elements.
iterator insert(const_iterator position, value_type &&x);
#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
//! <b>Requires</b>: first, last are not iterators into *this.
Modified: branches/release/boost/container/list.hpp
==============================================================================
--- branches/release/boost/container/list.hpp Mon Sep 16 12:59:29 2013 (r85703)
+++ branches/release/boost/container/list.hpp 2013-09-16 13:00:22 EDT (Mon, 16 Sep 2013) (r85704)
@@ -777,7 +777,7 @@
//! <b>Complexity</b>: Amortized constant time.
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.
Modified: branches/release/boost/container/set.hpp
==============================================================================
--- branches/release/boost/container/set.hpp Mon Sep 16 12:59:29 2013 (r85703)
+++ branches/release/boost/container/set.hpp 2013-09-16 13:00:22 EDT (Mon, 16 Sep 2013) (r85704)
@@ -457,7 +457,7 @@
//! <b>Complexity</b>: Logarithmic.
iterator insert(const_iterator position, value_type &&x);
#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
//! <b>Requires</b>: first, last are not iterators into *this.
@@ -1077,7 +1077,7 @@
//! is inserted right before p.
iterator insert(const_iterator position, value_type &&x);
#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
//! <b>Requires</b>: first, last are not iterators into *this.
Modified: branches/release/boost/container/slist.hpp
==============================================================================
--- branches/release/boost/container/slist.hpp Mon Sep 16 12:59:29 2013 (r85703)
+++ branches/release/boost/container/slist.hpp 2013-09-16 13:00:22 EDT (Mon, 16 Sep 2013) (r85704)
@@ -753,7 +753,7 @@
//! previous values.
iterator insert_after(const_iterator prev_pos, T &&x);
#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
//! <b>Requires</b>: prev_pos must be a valid iterator of *this.
@@ -1266,7 +1266,7 @@
//! <b>Complexity</b>: Linear to the elements before p.
iterator insert(const_iterator prev_pos, 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.
Modified: branches/release/boost/container/stable_vector.hpp
==============================================================================
--- branches/release/boost/container/stable_vector.hpp Mon Sep 16 12:59:29 2013 (r85703)
+++ branches/release/boost/container/stable_vector.hpp 2013-09-16 13:00:22 EDT (Mon, 16 Sep 2013) (r85704)
@@ -1306,7 +1306,7 @@
//! 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>: pos must be a valid iterator of *this.
Modified: branches/release/boost/container/vector.hpp
==============================================================================
--- branches/release/boost/container/vector.hpp Mon Sep 16 12:59:29 2013 (r85703)
+++ branches/release/boost/container/vector.hpp 2013-09-16 13:00:22 EDT (Mon, 16 Sep 2013) (r85704)
@@ -1347,7 +1347,7 @@
//! 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 @@
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 @@
}
//New buffer
else{
- //Backwards (and possibly forward) expansion
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
++this->num_alloc;
#endif
@@ -1685,7 +1688,11 @@
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);
}
Modified: branches/release/libs/container/doc/container.qbk
==============================================================================
--- branches/release/libs/container/doc/container.qbk Mon Sep 16 12:59:29 2013 (r85703)
+++ branches/release/libs/container/doc/container.qbk 2013-09-16 13:00:22 EDT (Mon, 16 Sep 2013) (r85704)
@@ -720,8 +720,10 @@
* 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/8892 #8892],
- [@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/9009 #9009],
+ [@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]
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk