|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65040 - branches/release/boost/intrusive
From: igaztanaga_at_[hidden]
Date: 2010-08-26 17:35:59
Author: igaztanaga
Date: 2010-08-26 17:35:57 EDT (Thu, 26 Aug 2010)
New Revision: 65040
URL: http://svn.boost.org/trac/boost/changeset/65040
Log:
Fixes for Boost 1.45
Text files modified:
branches/release/boost/intrusive/avltree.hpp | 6 +++---
branches/release/boost/intrusive/member_value_traits.hpp | 4 ++--
branches/release/boost/intrusive/sgtree.hpp | 4 ++--
branches/release/boost/intrusive/slist.hpp | 36 +++++++++++++++++++++++++++---------
4 files changed, 34 insertions(+), 16 deletions(-)
Modified: branches/release/boost/intrusive/avltree.hpp
==============================================================================
--- branches/release/boost/intrusive/avltree.hpp (original)
+++ branches/release/boost/intrusive/avltree.hpp 2010-08-26 17:35:57 EDT (Thu, 26 Aug 2010)
@@ -113,7 +113,7 @@
<pointer, node>::type node_ptr;
typedef typename boost::pointer_to_other
<node_ptr, const node>::type const_node_ptr;
- typedef avltree_algorithms<node_traits> node_algorithms;
+ typedef avltree_algorithms<node_traits> node_algorithms;
static const bool constant_time_size = Config::constant_time_size;
static const bool stateful_value_traits = detail::store_cont_ptr_on_it<avltree_impl>::value;
@@ -167,7 +167,7 @@
static node_ptr uncast(const_node_ptr ptr)
{
- return node_ptr(const_cast<node*>(detail::get_pointer(ptr)));
+ return node_ptr(const_cast<node*>(detail::boost_intrusive_get_pointer(ptr)));
}
size_traits &priv_size_traits()
@@ -1398,7 +1398,7 @@
static avltree_impl &priv_container_from_end_iterator(const const_iterator &end_iterator)
{
header_plus_size *r = detail::parent_from_member<header_plus_size, node>
- ( detail::get_pointer(end_iterator.pointed_node()), &header_plus_size::header_);
+ ( detail::boost_intrusive_get_pointer(end_iterator.pointed_node()), &header_plus_size::header_);
node_plus_pred_t *n = detail::parent_from_member
<node_plus_pred_t, header_plus_size>(r, &node_plus_pred_t::header_plus_size_);
data_t *d = detail::parent_from_member<data_t, node_plus_pred_t>(n, &data_t::node_plus_pred_);
Modified: branches/release/boost/intrusive/member_value_traits.hpp
==============================================================================
--- branches/release/boost/intrusive/member_value_traits.hpp (original)
+++ branches/release/boost/intrusive/member_value_traits.hpp 2010-08-26 17:35:57 EDT (Thu, 26 Aug 2010)
@@ -49,13 +49,13 @@
static pointer to_value_ptr(node_ptr n)
{
return pointer(detail::parent_from_member<value_type, node>
- (detail::get_pointer(n), PtrToMember));
+ (detail::boost_intrusive_get_pointer(n), PtrToMember));
}
static const_pointer to_value_ptr(const_node_ptr n)
{
return pointer(detail::parent_from_member<value_type, node>
- (detail::get_pointer(n), PtrToMember));
+ (detail::boost_intrusive_get_pointer(n), PtrToMember));
}
};
Modified: branches/release/boost/intrusive/sgtree.hpp
==============================================================================
--- branches/release/boost/intrusive/sgtree.hpp (original)
+++ branches/release/boost/intrusive/sgtree.hpp 2010-08-26 17:35:57 EDT (Thu, 26 Aug 2010)
@@ -310,7 +310,7 @@
{ return data_.node_plus_pred_.header_plus_alpha_.header_; }
static node_ptr uncast(const_node_ptr ptr)
- { return node_ptr(const_cast<node*>(detail::get_pointer(ptr))); }
+ { return node_ptr(const_cast<node*>(detail::boost_intrusive_get_pointer(ptr))); }
size_traits &priv_size_traits()
{ return data_.node_plus_pred_.size_traits_; }
@@ -1631,7 +1631,7 @@
static sgtree_impl &priv_container_from_end_iterator(const const_iterator &end_iterator)
{
header_plus_alpha *r = detail::parent_from_member<header_plus_alpha, node>
- ( detail::get_pointer(end_iterator.pointed_node()), &header_plus_alpha::header_);
+ ( detail::boost_intrusive_get_pointer(end_iterator.pointed_node()), &header_plus_alpha::header_);
node_plus_pred_t *n = detail::parent_from_member
<node_plus_pred_t, header_plus_alpha>(r, &node_plus_pred_t::header_plus_alpha_);
data_t *d = detail::parent_from_member<data_t, node_plus_pred_t>(n, &data_t::node_plus_pred_);
Modified: branches/release/boost/intrusive/slist.hpp
==============================================================================
--- branches/release/boost/intrusive/slist.hpp (original)
+++ branches/release/boost/intrusive/slist.hpp 2010-08-26 17:35:57 EDT (Thu, 26 Aug 2010)
@@ -31,6 +31,7 @@
#include <algorithm>
#include <cstddef> //std::size_t
#include <utility> //std::pair
+//iG pending #include <boost/pointer_cast.hpp>
namespace boost {
namespace intrusive {
@@ -129,10 +130,9 @@
typedef slist_iterator<slist_impl, true> const_iterator;
typedef typename real_value_traits::node_traits node_traits;
typedef typename node_traits::node node;
- typedef typename boost::pointer_to_other
- <pointer, node>::type node_ptr;
- typedef typename boost::pointer_to_other
- <pointer, const node>::type const_node_ptr;
+ typedef typename node_traits::node_ptr node_ptr;
+ typedef typename node_traits::const_node_ptr const_node_ptr;
+
typedef typename detail::if_c
< Config::linear
, linear_slist_algorithms<node_traits>
@@ -206,7 +206,8 @@
{ data_.root_plus_size_.last_ = n; }
static node_ptr uncast(const_node_ptr ptr)
- { return node_ptr(const_cast<node*>(detail::get_pointer(ptr))); }
+ { return node_ptr(const_cast<node*>(detail::boost_intrusive_get_pointer(ptr))); }
+//iG pending { return boost::const_pointer_cast<node>(ptr); }
void set_default_constructed_state()
{
@@ -251,6 +252,22 @@
real_value_traits &get_real_value_traits(detail::bool_<true>)
{ return data_.get_value_traits(*this); }
+ const value_traits &get_value_traits() const
+ { return data_; }
+
+ value_traits &get_value_traits()
+ { return data_; }
+
+ protected:
+ node &prot_root_node()
+ { return data_.root_plus_size_.root_; }
+
+ node const &prot_root_node() const
+ { return data_.root_plus_size_.root_; }
+
+ void prot_set_size(size_type s)
+ { data_.root_plus_size_.set_size(s); }
+
/// @endcond
public:
@@ -1220,7 +1237,7 @@
//! assigned to the last spliced element or prev if x is empty.
//! This iterator can be used as new "prev" iterator for a new splice_after call.
//! that will splice new values after the previously spliced values.
- void splice(const_iterator it, slist_impl &x, iterator *last = 0)
+ void splice(const_iterator it, slist_impl &x, const_iterator *last = 0)
{ this->splice_after(this->previous(it), x, last); }
//! <b>Requires</b>: it p must be a valid iterator of *this.
@@ -1295,8 +1312,9 @@
{
if (node_traits::get_next(node_traits::get_next(this->get_root_node()))
!= this->get_root_node()) {
- slist_impl carry;
- slist_impl counter[64];
+
+ slist_impl carry(this->get_value_traits());
+ detail::array_initializer<slist_impl, 64> counter(this->get_value_traits());
int fill = 0;
const_iterator last_inserted;
while(!this->empty()){
@@ -1879,7 +1897,7 @@
//singly linked lists (because "end" is represented by the null pointer)
BOOST_STATIC_ASSERT(!linear);
root_plus_size *r = detail::parent_from_member<root_plus_size, node>
- ( detail::get_pointer(end_iterator.pointed_node()), (&root_plus_size::root_));
+ ( detail::boost_intrusive_get_pointer(end_iterator.pointed_node()), (&root_plus_size::root_));
data_t *d = detail::parent_from_member<data_t, root_plus_size>
( r, &data_t::root_plus_size_);
slist_impl *s = detail::parent_from_member<slist_impl, data_t>(d, &slist_impl::data_);
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