Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68074 - in branches/release/boost/intrusive: . detail
From: igaztanaga_at_[hidden]
Date: 2011-01-12 17:24:30


Author: igaztanaga
Date: 2011-01-12 17:24:28 EST (Wed, 12 Jan 2011)
New Revision: 68074
URL: http://svn.boost.org/trac/boost/changeset/68074

Log:
Merge from trunk for 1.46
Text files modified:
   branches/release/boost/intrusive/avltree.hpp | 21 ++++++++++++---------
   branches/release/boost/intrusive/detail/tree_node.hpp | 2 +-
   branches/release/boost/intrusive/rbtree.hpp | 12 +++++++-----
   branches/release/boost/intrusive/sgtree.hpp | 12 ++++++------
   branches/release/boost/intrusive/splaytree.hpp | 12 +++++++-----
   branches/release/boost/intrusive/treap.hpp | 21 ++++++++++++---------
   6 files changed, 45 insertions(+), 35 deletions(-)

Modified: branches/release/boost/intrusive/avltree.hpp
==============================================================================
--- branches/release/boost/intrusive/avltree.hpp (original)
+++ branches/release/boost/intrusive/avltree.hpp 2011-01-12 17:24:28 EST (Wed, 12 Jan 2011)
@@ -465,9 +465,10 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
- return iterator(node_algorithms::insert_equal_upper_bound
+ iterator ret(node_algorithms::insert_equal_upper_bound
          (node_ptr(&priv_header()), to_insert, key_node_comp), this);
+ this->priv_size_traits().increment();
+ return ret;
    }
 
    //! <b>Requires</b>: value must be an lvalue, and "hint" must be
@@ -491,9 +492,10 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
- return iterator(node_algorithms::insert_equal
+ iterator ret(node_algorithms::insert_equal
          (node_ptr(&priv_header()), hint.pointed_node(), to_insert, key_node_comp), this);
+ this->priv_size_traits().increment();
+ return ret;
    }
 
    //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
@@ -698,9 +700,9 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
       node_algorithms::insert_unique_commit
                (node_ptr(&priv_header()), to_insert, commit_data);
+ this->priv_size_traits().increment();
       return iterator(to_insert, this);
    }
 
@@ -723,9 +725,10 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
- return iterator(node_algorithms::insert_before
+ iterator ret(node_algorithms::insert_before
          (node_ptr(&priv_header()), pos.pointed_node(), to_insert), this);
+ this->priv_size_traits().increment();
+ return ret;
    }
 
    //! <b>Requires</b>: value must be an lvalue, and it must be no less
@@ -747,8 +750,8 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
       node_algorithms::push_back(node_ptr(&priv_header()), to_insert);
+ this->priv_size_traits().increment();
    }
 
    //! <b>Requires</b>: value must be an lvalue, and it must be no greater
@@ -770,8 +773,8 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
       node_algorithms::push_front(node_ptr(&priv_header()), to_insert);
+ this->priv_size_traits().increment();
    }
 
    //! <b>Effects</b>: Erases the element pointed to by pos.

Modified: branches/release/boost/intrusive/detail/tree_node.hpp
==============================================================================
--- branches/release/boost/intrusive/detail/tree_node.hpp (original)
+++ branches/release/boost/intrusive/detail/tree_node.hpp 2011-01-12 17:24:28 EST (Wed, 12 Jan 2011)
@@ -96,7 +96,7 @@
 
 
    tree_iterator()
- : members_ (0, 0)
+ : members_ (node_ptr(0), (const void *)0)
    {}
 
    explicit tree_iterator(node_ptr nodeptr, const Container *cont_ptr)

Modified: branches/release/boost/intrusive/rbtree.hpp
==============================================================================
--- branches/release/boost/intrusive/rbtree.hpp (original)
+++ branches/release/boost/intrusive/rbtree.hpp 2011-01-12 17:24:28 EST (Wed, 12 Jan 2011)
@@ -478,9 +478,10 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
- return iterator(node_algorithms::insert_equal_upper_bound
+ iterator ret(node_algorithms::insert_equal_upper_bound
          (node_ptr(&priv_header()), to_insert, key_node_comp), this);
+ this->priv_size_traits().increment();
+ return ret;
    }
 
    //! <b>Requires</b>: value must be an lvalue, and "hint" must be
@@ -504,9 +505,10 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
- return iterator(node_algorithms::insert_equal
+ iterator ret(node_algorithms::insert_equal
          (node_ptr(&priv_header()), hint.pointed_node(), to_insert, key_node_comp), this);
+ this->priv_size_traits().increment();
+ return ret;
    }
 
    //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
@@ -711,9 +713,9 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
       node_algorithms::insert_unique_commit
                (node_ptr(&priv_header()), to_insert, commit_data);
+ this->priv_size_traits().increment();
       return iterator(to_insert, this);
    }
 

Modified: branches/release/boost/intrusive/sgtree.hpp
==============================================================================
--- branches/release/boost/intrusive/sgtree.hpp (original)
+++ branches/release/boost/intrusive/sgtree.hpp 2011-01-12 17:24:28 EST (Wed, 12 Jan 2011)
@@ -621,11 +621,11 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
       std::size_t max_tree_size = (std::size_t)data_.max_tree_size_;
       node_ptr p = node_algorithms::insert_equal_upper_bound
          (node_ptr(&priv_header()), to_insert, key_node_comp
          , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size);
+ this->priv_size_traits().increment();
       data_.max_tree_size_ = (size_type)max_tree_size;
       return iterator(p, this);
    }
@@ -651,11 +651,11 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
       std::size_t max_tree_size = (std::size_t)data_.max_tree_size_;
       node_ptr p = node_algorithms::insert_equal
          (node_ptr(&priv_header()), hint.pointed_node(), to_insert, key_node_comp
          , (std::size_t)this->size(), this->get_h_alpha_func(), max_tree_size);
+ this->priv_size_traits().increment();
       data_.max_tree_size_ = (size_type)max_tree_size;
       return iterator(p, this);
    }
@@ -862,11 +862,11 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
       std::size_t max_tree_size = (std::size_t)data_.max_tree_size_;
       node_algorithms::insert_unique_commit
          ( node_ptr(&priv_header()), to_insert, commit_data
          , (std::size_t)this->size(), this->get_h_alpha_func(), max_tree_size);
+ this->priv_size_traits().increment();
       data_.max_tree_size_ = (size_type)max_tree_size;
       return iterator(to_insert, this);
    }
@@ -890,11 +890,11 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
       std::size_t max_tree_size = (std::size_t)data_.max_tree_size_;
       node_ptr p = node_algorithms::insert_before
          ( node_ptr(&priv_header()), pos.pointed_node(), to_insert
          , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size);
+ this->priv_size_traits().increment();
       data_.max_tree_size_ = (size_type)max_tree_size;
       return iterator(p, this);
    }
@@ -918,11 +918,11 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
       std::size_t max_tree_size = (std::size_t)data_.max_tree_size_;
       node_algorithms::push_back
          ( node_ptr(&priv_header()), to_insert
          , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size);
+ this->priv_size_traits().increment();
       data_.max_tree_size_ = (size_type)max_tree_size;
    }
 
@@ -945,11 +945,11 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
       std::size_t max_tree_size = (std::size_t)data_.max_tree_size_;
       node_algorithms::push_front
          ( node_ptr(&priv_header()), to_insert
          , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size);
+ this->priv_size_traits().increment();
       data_.max_tree_size_ = (size_type)max_tree_size;
    }
 

Modified: branches/release/boost/intrusive/splaytree.hpp
==============================================================================
--- branches/release/boost/intrusive/splaytree.hpp (original)
+++ branches/release/boost/intrusive/splaytree.hpp 2011-01-12 17:24:28 EST (Wed, 12 Jan 2011)
@@ -466,9 +466,10 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
- return iterator(node_algorithms::insert_equal_lower_bound
+ iterator ret (node_algorithms::insert_equal_lower_bound
          (node_ptr(&priv_header()), to_insert, key_node_comp), this);
+ this->priv_size_traits().increment();
+ return ret;
    }
 
    //! <b>Requires</b>: value must be an lvalue, and "hint" must be
@@ -492,9 +493,10 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
- return iterator(node_algorithms::insert_equal
+ iterator ret(node_algorithms::insert_equal
          (node_ptr(&priv_header()), hint.pointed_node(), to_insert, key_node_comp), this);
+ this->priv_size_traits().increment();
+ return ret;
    }
 
    //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
@@ -693,9 +695,9 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
       node_algorithms::insert_unique_commit
                (node_ptr(&priv_header()), to_insert, commit_data);
+ this->priv_size_traits().increment();
       return iterator(to_insert, this);
    }
 

Modified: branches/release/boost/intrusive/treap.hpp
==============================================================================
--- branches/release/boost/intrusive/treap.hpp (original)
+++ branches/release/boost/intrusive/treap.hpp 2011-01-12 17:24:28 EST (Wed, 12 Jan 2011)
@@ -549,9 +549,10 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
- return iterator(node_algorithms::insert_equal_upper_bound
+ iterator ret(node_algorithms::insert_equal_upper_bound
          (node_ptr(&priv_header()), to_insert, key_node_comp, key_node_pcomp), this);
+ this->priv_size_traits().increment();
+ return ret;
    }
 
    //! <b>Requires</b>: value must be an lvalue, and "hint" must be
@@ -577,9 +578,10 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
- return iterator(node_algorithms::insert_equal
+ iterator ret (node_algorithms::insert_equal
          (node_ptr(&priv_header()), hint.pointed_node(), to_insert, key_node_comp, key_node_pcomp), this);
+ this->priv_size_traits().increment();
+ return ret;
    }
 
    //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
@@ -801,8 +803,8 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
       node_algorithms::insert_unique_commit(node_ptr(&priv_header()), to_insert, commit_data);
+ this->priv_size_traits().increment();
       return iterator(to_insert, this);
    }
 
@@ -825,11 +827,12 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
       detail::key_nodeptr_comp<priority_compare, treap_impl>
          pcomp(priv_pcomp(), this);
- return iterator(node_algorithms::insert_before
+ iterator ret (node_algorithms::insert_before
          (node_ptr(&priv_header()), pos.pointed_node(), to_insert, pcomp), this);
+ this->priv_size_traits().increment();
+ return ret;
    }
 
    //! <b>Requires</b>: value must be an lvalue, and it must be no less
@@ -851,10 +854,10 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
       detail::key_nodeptr_comp<priority_compare, treap_impl>
          pcomp(priv_pcomp(), this);
       node_algorithms::push_back(node_ptr(&priv_header()), to_insert, pcomp);
+ this->priv_size_traits().increment();
    }
 
    //! <b>Requires</b>: value must be an lvalue, and it must be no greater
@@ -876,10 +879,10 @@
       node_ptr to_insert(get_real_value_traits().to_node_ptr(value));
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
- this->priv_size_traits().increment();
       detail::key_nodeptr_comp<priority_compare, treap_impl>
          pcomp(priv_pcomp(), this);
       node_algorithms::push_front(node_ptr(&priv_header()), to_insert, pcomp);
+ this->priv_size_traits().increment();
    }
 
    //! <b>Effects</b>: Erases the element pointed to by pos.


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