Ticket #2194: wp.patch

File wp.patch, 822 bytes (added by Stéphanie Rancourt <srancourt@…>, 14 years ago)
  • .hpp

    old new  
    1414//
    1515
    1616#include <memory> // boost.TR1 include order fix
     17#include <boost/detail/no_exceptions_support.hpp>
    1718#include <boost/detail/shared_count.hpp>
    1819#include <boost/shared_ptr.hpp>
    1920
     
    101102            return shared_ptr<element_type>();
    102103        }
    103104
    104         try
     105        BOOST_TRY
    105106        {
    106107            return shared_ptr<element_type>(*this);
    107108        }
    108         catch(bad_weak_ptr const &)
     109        BOOST_CATCH(bad_weak_ptr const &)
    109110        {
    110111            // Q: how can we get here?
    111112            // A: another thread may have invalidated r after the use_count test above.
    112113            return shared_ptr<element_type>();
    113114        }
     115        BOOST_CATCH_END
    114116
    115117#else
    116118