Ticket #7598: unique_ptr.3.patch

File unique_ptr.3.patch, 1.5 KB (added by Ion Gaztañaga, 10 years ago)

Corrected patch

  • boost/interprocess/smart_ptr/unique_ptr.hpp

    old new  
    8282class unique_ptr
    8383{
    8484   /// @cond
    85    struct nat {int for_bool_;};
     85   struct nat  {int for_bool;};
     86   struct nat2 {int for_bool;};
     87   typedef int nat2::*nullptr_t;
    8688   typedef typename ipcdetail::add_reference<D>::type deleter_reference;
    8789   typedef typename ipcdetail::add_reference<const D>::type deleter_const_reference;
    8890   /// @endcond
     
    175177   //!
    176178   //!Throws: nothing.
    177179   template <class U, class E>
    178    unique_ptr(BOOST_RV_REF_2_TEMPL_ARGS(unique_ptr, U, E) u,
     180   unique_ptr(BOOST_RV_REF_BEG unique_ptr<U, E> BOOST_RV_REF_END u,
    179181      typename ipcdetail::enable_if_c<
    180182            ipcdetail::is_convertible<typename unique_ptr<U, E>::pointer, pointer>::value &&
    181183            ipcdetail::is_convertible<E, D>::value &&
     
    230232   //!
    231233   //!Throws: nothing.
    232234   template <class U, class E>
    233    unique_ptr& operator=(BOOST_RV_REF_2_TEMPL_ARGS(unique_ptr, U, E) u)
     235   unique_ptr& operator=(BOOST_RV_REF_BEG unique_ptr<U, E> BOOST_RV_REF_END u)
    234236   {
    235237      reset(u.release());
    236238      ptr_.second() = boost::move(u.get_deleter());
     
    246248   //!Returns: *this.
    247249   //!
    248250   //!Throws: nothing.
    249    unique_ptr& operator=(int nat::*)
     251   unique_ptr& operator=(nullptr_t)
    250252   {
    251253      reset();
    252254      return *this;