[prev in list] [next in list] [prev in thread] [next in thread] 

List:       boost-users
Subject:    Re: [Boost-users] Re: using boost::shared_ptr with boost::signal
From:       Doug Gregor <dgregor () cs ! indiana ! edu>
Date:       2004-07-25 19:44:12
Message-ID: 00C1CCF2-DE73-11D8-9E5B-000D932B7224 () cs ! indiana ! edu
[Download RAW message or body]


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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic