Ticket #2194: wp.patch
File wp.patch, 822 bytes (added by , 14 years ago) |
---|
-
.hpp
old new 14 14 // 15 15 16 16 #include <memory> // boost.TR1 include order fix 17 #include <boost/detail/no_exceptions_support.hpp> 17 18 #include <boost/detail/shared_count.hpp> 18 19 #include <boost/shared_ptr.hpp> 19 20 … … 101 102 return shared_ptr<element_type>(); 102 103 } 103 104 104 try105 BOOST_TRY 105 106 { 106 107 return shared_ptr<element_type>(*this); 107 108 } 108 catch(bad_weak_ptr const &)109 BOOST_CATCH(bad_weak_ptr const &) 109 110 { 110 111 // Q: how can we get here? 111 112 // A: another thread may have invalidated r after the use_count test above. 112 113 return shared_ptr<element_type>(); 113 114 } 115 BOOST_CATCH_END 114 116 115 117 #else 116 118