|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80512 - in trunk/boost/intrusive: . detail
From: igaztanaga_at_[hidden]
Date: 2012-09-13 14:52:36
Author: igaztanaga
Date: 2012-09-13 14:52:35 EDT (Thu, 13 Sep 2012)
New Revision: 80512
URL: http://svn.boost.org/trac/boost/changeset/80512
Log:
Changed return types from reference to value due to subtle aliasing errors.
Text files modified:
trunk/boost/intrusive/detail/avltree_node.hpp | 10 +++++-----
trunk/boost/intrusive/detail/list_node.hpp | 4 ++--
trunk/boost/intrusive/detail/rbtree_node.hpp | 10 +++++-----
trunk/boost/intrusive/detail/slist_node.hpp | 2 +-
trunk/boost/intrusive/detail/tree_node.hpp | 6 +++---
trunk/boost/intrusive/pointer_traits.hpp | 2 +-
6 files changed, 17 insertions(+), 17 deletions(-)
Modified: trunk/boost/intrusive/detail/avltree_node.hpp
==============================================================================
--- trunk/boost/intrusive/detail/avltree_node.hpp (original)
+++ trunk/boost/intrusive/detail/avltree_node.hpp 2012-09-13 14:52:35 EDT (Thu, 13 Sep 2012)
@@ -68,19 +68,19 @@
typedef typename node::balance balance;
- static const node_ptr & get_parent(const const_node_ptr & n)
+ static node_ptr get_parent(const const_node_ptr & n)
{ return n->parent_; }
static void set_parent(const node_ptr & n, const node_ptr & p)
{ n->parent_ = p; }
- static const node_ptr & get_left(const const_node_ptr & n)
+ static node_ptr get_left(const const_node_ptr & n)
{ return n->left_; }
static void set_left(const node_ptr & n, const node_ptr & l)
{ n->left_ = l; }
- static const node_ptr & get_right(const const_node_ptr & n)
+ static node_ptr get_right(const const_node_ptr & n)
{ return n->right_; }
static void set_right(const node_ptr & n, const node_ptr & r)
@@ -125,13 +125,13 @@
static void set_parent(const node_ptr & n, const node_ptr & p)
{ ptr_bit::set_pointer(n->parent_, p); }
- static const node_ptr & get_left(const const_node_ptr & n)
+ static node_ptr get_left(const const_node_ptr & n)
{ return n->left_; }
static void set_left(const node_ptr & n, const node_ptr & l)
{ n->left_ = l; }
- static const node_ptr & get_right(const const_node_ptr & n)
+ static node_ptr get_right(const const_node_ptr & n)
{ return n->right_; }
static void set_right(const node_ptr & n, const node_ptr & r)
Modified: trunk/boost/intrusive/detail/list_node.hpp
==============================================================================
--- trunk/boost/intrusive/detail/list_node.hpp (original)
+++ trunk/boost/intrusive/detail/list_node.hpp 2012-09-13 14:52:35 EDT (Thu, 13 Sep 2012)
@@ -44,13 +44,13 @@
typedef typename pointer_traits
<VoidPointer>:: template rebind_pointer<const node>::type const_node_ptr;
- static const node_ptr &get_previous(const const_node_ptr & n)
+ static node_ptr get_previous(const const_node_ptr & n)
{ return n->prev_; }
static void set_previous(const node_ptr & n, const node_ptr & prev)
{ n->prev_ = prev; }
- static const node_ptr &get_next(const const_node_ptr & n)
+ static node_ptr get_next(const const_node_ptr & n)
{ return n->next_; }
static void set_next(const node_ptr & n, const node_ptr & next)
Modified: trunk/boost/intrusive/detail/rbtree_node.hpp
==============================================================================
--- trunk/boost/intrusive/detail/rbtree_node.hpp (original)
+++ trunk/boost/intrusive/detail/rbtree_node.hpp 2012-09-13 14:52:35 EDT (Thu, 13 Sep 2012)
@@ -68,19 +68,19 @@
typedef typename node::color color;
- static const node_ptr & get_parent(const const_node_ptr & n)
+ static node_ptr get_parent(const const_node_ptr & n)
{ return n->parent_; }
static void set_parent(const node_ptr & n, const node_ptr & p)
{ n->parent_ = p; }
- static const node_ptr & get_left(const const_node_ptr & n)
+ static node_ptr get_left(const const_node_ptr & n)
{ return n->left_; }
static void set_left(const node_ptr & n, const node_ptr & l)
{ n->left_ = l; }
- static const node_ptr & get_right(const const_node_ptr & n)
+ static node_ptr get_right(const const_node_ptr & n)
{ return n->right_; }
static void set_right(const node_ptr & n, const node_ptr & r)
@@ -120,13 +120,13 @@
static void set_parent(const node_ptr & n, const node_ptr & p)
{ ptr_bit::set_pointer(n->parent_, p); }
- static const node_ptr & get_left(const const_node_ptr & n)
+ static node_ptr get_left(const const_node_ptr & n)
{ return n->left_; }
static void set_left(const node_ptr & n, const node_ptr & l)
{ n->left_ = l; }
- static const node_ptr & get_right(const const_node_ptr & n)
+ static node_ptr get_right(const const_node_ptr & n)
{ return n->right_; }
static void set_right(const node_ptr & n, const node_ptr & r)
Modified: trunk/boost/intrusive/detail/slist_node.hpp
==============================================================================
--- trunk/boost/intrusive/detail/slist_node.hpp (original)
+++ trunk/boost/intrusive/detail/slist_node.hpp 2012-09-13 14:52:35 EDT (Thu, 13 Sep 2012)
@@ -42,7 +42,7 @@
typedef typename pointer_traits
<VoidPointer>::template rebind_pointer<const node>::type const_node_ptr;
- static const node_ptr &get_next(const const_node_ptr & n)
+ static node_ptr get_next(const const_node_ptr & n)
{ return n->next_; }
static void set_next(const node_ptr & n, const node_ptr & next)
Modified: trunk/boost/intrusive/detail/tree_node.hpp
==============================================================================
--- trunk/boost/intrusive/detail/tree_node.hpp (original)
+++ trunk/boost/intrusive/detail/tree_node.hpp 2012-09-13 14:52:35 EDT (Thu, 13 Sep 2012)
@@ -41,19 +41,19 @@
typedef typename pointer_traits<VoidPointer>::template
rebind_pointer<const node>::type const_node_ptr;
- static const node_ptr & get_parent(const const_node_ptr & n)
+ static node_ptr get_parent(const const_node_ptr & n)
{ return n->parent_; }
static void set_parent(const node_ptr & n, const node_ptr & p)
{ n->parent_ = p; }
- static const node_ptr & get_left(const const_node_ptr & n)
+ static node_ptr get_left(const const_node_ptr & n)
{ return n->left_; }
static void set_left(const node_ptr & n, const node_ptr & l)
{ n->left_ = l; }
- static const node_ptr & get_right(const const_node_ptr & n)
+ static node_ptr get_right(const const_node_ptr & n)
{ return n->right_; }
static void set_right(const node_ptr & n, const node_ptr & r)
Modified: trunk/boost/intrusive/pointer_traits.hpp
==============================================================================
--- trunk/boost/intrusive/pointer_traits.hpp (original)
+++ trunk/boost/intrusive/pointer_traits.hpp 2012-09-13 14:52:35 EDT (Thu, 13 Sep 2012)
@@ -170,7 +170,7 @@
template<class UPtr>
static pointer priv_static_cast_from(boost::false_type, const UPtr &uptr)
- { return pointer_to(static_cast<element_type&>(*uptr)); }
+ { return pointer_to(*static_cast<element_type*>(to_raw_pointer(uptr))); }
//priv_const_cast_from
template<class UPtr>
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