Ticket #10798: 003-move-unique_ptr-pointer-type.patch

File 003-move-unique_ptr-pointer-type.patch, 957 bytes (added by Matteo Settenvini <matteo.settenvini@…>, 8 years ago)

Temporary workaround patch

  • boost/move/detail/unique_ptr_meta_utils.hpp

    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  
    1414#ifndef BOOST_MOVE_UNIQUE_PTR_DETAIL_META_UTILS_HPP
    1515#define BOOST_MOVE_UNIQUE_PTR_DETAIL_META_UTILS_HPP
    1616
     17#include <boost/intrusive/pointer_traits.hpp>
     18
    1719#include <cstddef>   //for std::size_t
    1820
    1921//Small meta-typetraits to support move
     
    383385template <class T, class D, bool = has_pointer_type<D>::value>
    384386struct pointer_type_imp
    385387{
    386     typedef typename D::pointer type;
     388    typedef typename boost::intrusive::pointer_traits<typename D::pointer>::template rebind_pointer<T>::type type;
    387389};
    388390
    389391template <class T, class D>