Boost logo

Boost Users :

Subject: Re: [Boost-users] shared_ptr and signals
From: James C. Sutherland (James.Sutherland_at_[hidden])
Date: 2008-12-30 12:47:30


On Dec 30, 2008, at 10:48 AM, Mickael Wolff wrote:

> James C. Sutherland a écrit :
>> mySignal.connect(a);
>
> mySignal.connect(*a); // because connect copy the callback/functor.
>
> I guess you have to write a callable_shared_ptr or something. I
> d'idn't find it in Boost.
>

I cannot dereference the pointer because I must be able to modify the
object, and as you point out the connect method copies the argument...

James


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