Use directly boost::movelib::pointer_element/to_raw_pointer

This commit is contained in:
Ion Gaztañaga committed 2017-04-07 16:05:44 +02:00
1 parent db15ff6c08
commit 018a39c433
14 files changed
+34 -115

No files matched your search

+2 -1
View File
@@ -16,6 +16,7 @@
#include<boost/intrusive/detail/iterator.hpp>
#include<boost/intrusive/detail/mpl.hpp>
#include<boost/static_assert.hpp>
#include<boost/move/detail/to_raw_pointer.hpp>
namespace boost {
namespace intrusive {
@@ -30,7 +31,7 @@ class delete_disposer
{
typedef typename boost::intrusive::iterator_traits<Pointer>::value_type value_type;
BOOST_STATIC_ASSERT(( detail::is_same<T, value_type>::value ));
delete boost::intrusive::detail::to_raw_pointer(p);
delete boost::movelib::to_raw_pointer(p);
}
};
+6 -5
View File
@@ -15,11 +15,12 @@
#include <boost/intrusive/detail/config_begin.hpp>
#include <boost/intrusive/pointer_traits.hpp>
#include <boost/detail/lightweight_test.hpp>
#include <boost/static_assert.hpp>
#include <boost/intrusive/detail/to_raw_pointer.hpp>
#include <boost/intrusive/detail/parent_from_member.hpp>
#include <boost/move/detail/to_raw_pointer.hpp>
#include <boost/static_assert.hpp>
#include <boost/detail/lightweight_test.hpp>
namespace boost{
namespace intrusive{
@@ -103,14 +104,14 @@ struct nonhook_node_member_value_traits
{
return pointer_traits<pointer>::pointer_to
(*detail::parent_from_member<T, NonHook_Member>
(static_cast<NonHook_Member*>(boost::intrusive::detail::to_raw_pointer(n)), P));
(static_cast<NonHook_Member*>(boost::movelib::to_raw_pointer(n)), P));
}
static const_pointer to_value_ptr(const_node_ptr n)
{
return pointer_traits<const_pointer>::pointer_to
(*detail::parent_from_member<T, NonHook_Member>
(static_cast<const NonHook_Member*>(boost::intrusive::detail::to_raw_pointer(n)), P));
(static_cast<const NonHook_Member*>(boost::movelib::to_raw_pointer(n)), P));
}
};