Ticket #7598: unique_ptr.patch

File unique_ptr.patch, 837 bytes (added by Adam Romanek <romanek.adam@…>, 10 years ago)
  • boost/interprocess/smart_ptr/unique_ptr.hpp

    diff -Naur boost_1_51_0/boost/interprocess/smart_ptr/unique_ptr.hpp boost_1_51_0_patched/boost/interprocess/smart_ptr/unique_ptr.hpp
    old new  
    281281   deleter_const_reference get_deleter() const
    282282   {  return ptr_.second();   }
    283283
    284    //!Returns: An unspecified value that, when used in boolean
    285    //!contexts, is equivalent to get() != 0.
     284   //!Returns: A boolean value that is equivalent to get() != 0.
    286285   //!
    287286   //!Throws: nothing.
    288    operator int nat::*() const
    289    {  return ptr_.first() ? &nat::for_bool_ : 0;   }
     287   operator bool () const
     288   {  return ptr_.first();   }
    290289
    291290   //!Postcondition: get() == 0.
    292291   //!