Lars Gullik Bjønnes wrote:
Helge Hafting <[EMAIL PROTECTED]> writes:
| This is not something I really expected to work, with gcc 4.1 being
| a work in progress. Still, if someone is interested,
| here is what happened:
This might be a fix, but I am not sure how nice this is, or why we get
these errors in the first place...
- typedef boost::signal<void()> FileChangedSig;
- typedef FileChangedSig::slot_type slot_type;
+ typedef boost::function<void()> slot_type;
My understanding is that this is not nice at all. Boost.Signal is able to
track the lifetime of the slot and so won't dereference a dangling pointer
should the owner of that slot go out of scope. AFAIK, Boost.Function has no
such ability.
We need such a safeguard because there's absolutely no guarantee that the
slot will still exist when the asynchronous process completes.
Makes sense? At the very least, I'd suggest doing some research on the
abilities of Boost.Function...
Angus