diff --git a/include/boost/intrusive/detail/hook_traits.hpp b/include/boost/intrusive/detail/hook_traits.hpp index 7a6f206..7f7dc27 100644 --- a/include/boost/intrusive/detail/hook_traits.hpp +++ b/include/boost/intrusive/detail/hook_traits.hpp @@ -57,26 +57,34 @@ struct bhtraits_base BOOST_INTRUSIVE_FORCEINLINE static pointer to_value_ptr(const node_ptr & n) { - return pointer_traits::pointer_to + pointer p = pointer_traits::pointer_to (static_cast(static_cast(*n))); + BOOST_ASSERT(!!p); + return p; } BOOST_INTRUSIVE_FORCEINLINE static const_pointer to_value_ptr(const const_node_ptr & n) { - return pointer_traits::pointer_to + const_pointer p = pointer_traits::pointer_to (static_cast(static_cast(*n))); + BOOST_ASSERT(!!p); + return p; } BOOST_INTRUSIVE_FORCEINLINE static node_ptr to_node_ptr(reference value) { - return pointer_traits::pointer_to + node_ptr p = pointer_traits::pointer_to (static_cast(static_cast(value))); + BOOST_ASSERT(!!p); + return p; } BOOST_INTRUSIVE_FORCEINLINE static const_node_ptr to_node_ptr(const_reference value) { - return pointer_traits::pointer_to + const_node_ptr p = pointer_traits::pointer_to (static_cast(static_cast(value))); + BOOST_ASSERT(!!p); + return p; } };