|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-02-25 13:37:39
Frank Mori Hess wrote:
> 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.
Why would you want to rethrow a bad_weak_ptr exception? Its meaning is
unambiguous; a weak_ptr has expired. This SlotFunction is most probably dead
and is informing you of its sorry state.
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