Boost logo

Boost Users :

From: Doug Gregor (dgregor_at_[hidden])
Date: 2004-07-25 14:44:12


On Jul 25, 2004, at 11:32 AM, Oliver Kowalke wrote:

> Am Samstag, 24. Juli 2004 22:22 schrieb Edward Diener:
> A proxy (with operator()(int, string) and operator(string,0)) which
> contains
> the smart pointer aptr could be connected to signal but maybe there is
> a
> better solution?!

It does seem like there should be a better solution, but I don't have
one at the moment. Typically, one is binding to some other member
function and therefore can use:

   boost::bind(&X::foo, shared_ptr_to_x, _1, _2)

The closest you can get without writing a proxy is to use
boost::ref(*shared_ptr_x), but _only_ if you know that there will be
another shared_ptr to that x that lives longer than the signal. It's
not a very good solution, I know :(

        Doug


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