Use pointer traits to obtain element_type in "to_raw_pointer"

This commit is contained in:
Ion Gaztañaga
2014-06-11 15:54:54 +02:00
parent c2100f349e
commit 9ec026937b

View File

@@ -34,6 +34,7 @@
#include <boost/type_traits/has_trivial_copy.hpp>
#include <boost/type_traits/has_trivial_assign.hpp>
#include <boost/container/detail/memory_util.hpp>
#include <boost/intrusive/pointer_traits.hpp>
#include <boost/aligned_storage.hpp>
#include <algorithm>
#include <iterator>
@@ -159,7 +160,7 @@ inline T* to_raw_pointer(T* p)
{ return p; }
template <class Pointer>
inline typename Pointer::element_type*
inline typename boost::intrusive::pointer_traits<Pointer>::element_type*
to_raw_pointer(const Pointer &p)
{ return boost::container::container_detail::to_raw_pointer(p.operator->()); }