diff --git a/include/boost/intrusive/detail/avltree_node.hpp b/include/boost/intrusive/detail/avltree_node.hpp index aec0dab..f9442eb 100644 --- a/include/boost/intrusive/detail/avltree_node.hpp +++ b/include/boost/intrusive/detail/avltree_node.hpp @@ -68,19 +68,19 @@ struct default_avltree_node_traits_impl 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 @@ struct compact_avltree_node_traits_impl 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) diff --git a/include/boost/intrusive/detail/list_node.hpp b/include/boost/intrusive/detail/list_node.hpp index d406af6..d25c3cd 100644 --- a/include/boost/intrusive/detail/list_node.hpp +++ b/include/boost/intrusive/detail/list_node.hpp @@ -44,13 +44,13 @@ struct list_node_traits typedef typename pointer_traits :: template rebind_pointer::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) diff --git a/include/boost/intrusive/detail/rbtree_node.hpp b/include/boost/intrusive/detail/rbtree_node.hpp index b76582b..1e64f0f 100644 --- a/include/boost/intrusive/detail/rbtree_node.hpp +++ b/include/boost/intrusive/detail/rbtree_node.hpp @@ -68,19 +68,19 @@ struct default_rbtree_node_traits_impl 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 @@ struct compact_rbtree_node_traits_impl 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) diff --git a/include/boost/intrusive/detail/slist_node.hpp b/include/boost/intrusive/detail/slist_node.hpp index 0eddbcd..d858d49 100644 --- a/include/boost/intrusive/detail/slist_node.hpp +++ b/include/boost/intrusive/detail/slist_node.hpp @@ -42,7 +42,7 @@ struct slist_node_traits typedef typename pointer_traits ::template rebind_pointer::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) diff --git a/include/boost/intrusive/detail/tree_node.hpp b/include/boost/intrusive/detail/tree_node.hpp index 09fa7a4..c7cbb5a 100644 --- a/include/boost/intrusive/detail/tree_node.hpp +++ b/include/boost/intrusive/detail/tree_node.hpp @@ -41,19 +41,19 @@ struct tree_node_traits typedef typename pointer_traits::template rebind_pointer::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) diff --git a/include/boost/intrusive/pointer_traits.hpp b/include/boost/intrusive/pointer_traits.hpp index 3ed1afb..98ca6b9 100644 --- a/include/boost/intrusive/pointer_traits.hpp +++ b/include/boost/intrusive/pointer_traits.hpp @@ -170,7 +170,7 @@ struct pointer_traits template static pointer priv_static_cast_from(boost::false_type, const UPtr &uptr) - { return pointer_to(static_cast(*uptr)); } + { return pointer_to(*static_cast(to_raw_pointer(uptr))); } //priv_const_cast_from template