Allows for using a non-templated destructor in a unique_ptr, able to destroy
an upcasted pointer too. At the moment, we just introduce an extra dependency
on Boost.Intrustive; we should report this bug upstream with a MWE.
old
|
new
|
|
14 | 14 | #ifndef BOOST_MOVE_UNIQUE_PTR_DETAIL_META_UTILS_HPP |
15 | 15 | #define BOOST_MOVE_UNIQUE_PTR_DETAIL_META_UTILS_HPP |
16 | 16 | |
| 17 | #include <boost/intrusive/pointer_traits.hpp> |
| 18 | |
17 | 19 | #include <cstddef> //for std::size_t |
18 | 20 | |
19 | 21 | //Small meta-typetraits to support move |
… |
… |
|
383 | 385 | template <class T, class D, bool = has_pointer_type<D>::value> |
384 | 386 | struct pointer_type_imp |
385 | 387 | { |
386 | | typedef typename D::pointer type; |
| 388 | typedef typename boost::intrusive::pointer_traits<typename D::pointer>::template rebind_pointer<T>::type type; |
387 | 389 | }; |
388 | 390 | |
389 | 391 | template <class T, class D> |