diff --git a/include/boost/intrusive/detail/hook_traits.hpp b/include/boost/intrusive/detail/hook_traits.hpp index c33ede0..bc51cde 100644 --- a/include/boost/intrusive/detail/hook_traits.hpp +++ b/include/boost/intrusive/detail/hook_traits.hpp @@ -46,6 +46,10 @@ struct bhtraits_base template rebind_pointer::type pointer; typedef typename pointer_traits:: template rebind_pointer::type const_pointer; + typedef typename pointer_traits:: + template rebind_pointer::type node_holder_ptr; + typedef typename pointer_traits:: + template rebind_pointer::type const_node_holder_ptr; typedef T & reference; typedef const T & const_reference; typedef node_holder_type & node_holder_reference; @@ -55,16 +59,14 @@ struct bhtraits_base inline static pointer to_value_ptr(node_ptr n) { - pointer p = pointer_traits::pointer_to - (static_cast(static_cast(*n))); - return p; + return pointer_traits:: + static_cast_from(pointer_traits::static_cast_from(n)); } inline static const_pointer to_value_ptr(const_node_ptr n) { - const_pointer p = pointer_traits::pointer_to - (static_cast(static_cast(*n))); - return p; + return pointer_traits:: + static_cast_from(pointer_traits::static_cast_from(n)); } inline static node_ptr to_node_ptr(reference value)