Update of /cvsroot/boost-sandbox/boost-sandbox/boost
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24123
Modified Files:
last_value.hpp
Log Message:
Throw more specific "expired_slot" exception, derived from bad_weak_ptr
when slot is called with an expired tracked object.
Index: last_value.hpp
===================================================================
RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/last_value.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- last_value.hpp 2 Mar 2007 22:04:46 -0000 1.3
+++ last_value.hpp 5 Mar 2007 15:10:54 -0000 1.4
@@ -13,10 +13,10 @@
#include <cassert>
#include <boost/optional.hpp>
-#include <boost/weak_ptr.hpp>
#include <stdexcept>
namespace boost {
+ class expired_slot;
// no_slots_error is thrown when we are unable to generate a return value
// due to no slots being connected to the signal.
class no_slots_error: public std::runtime_error
@@ -56,7 +56,7 @@
{
value = *first;
}
- catch(const bad_weak_ptr &err)
+ catch(const expired_slot &err)
{}
++first;
}
@@ -82,7 +82,7 @@
{
*first;
}
- catch(const bad_weak_ptr &err)
+ catch(const expired_slot &err)
{}
++first;
}
|