
25 Feb
2007
25 Feb
'07
5:57 p.m.
On Sunday 25 February 2007 12:39 pm, Peter Dimov wrote:
I think I prefer:
bool expired() const; R operator()( A... ) const; // throws bad_weak_ptr
As I recall, the other objection raised by Timmo was the ambiguity as to whether a caught bad_weak_ptr exception was thrown by the slot or the underlying SlotFunction. In one case, the signal would just disconnect the slot and move on. In the other, it would want to rethrow the exception. Perhaps that could be mitigated by throwing a more specific exception, like an expired_slot derived from bad_weak_ptr? -- Frank