Boost logo

Boost Users :

From: Frank Mori Hess (fmhess_at_[hidden])
Date: 2007-02-25 12:57:47


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



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net