Boost logo

Boost Users :

Subject: Re: [Boost-users] Problem with weak_ptr exception
From: Jacob Carlborg (doob_at_[hidden])
Date: 2009-10-28 11:29:59


On 10/28/09 15:41, Igor R wrote:
>> I've already tried boost::shared_from_this and it gives me the same result.
>
> Inherit A from enable_shared_from_this<A>.
> In B use static_pointer_cast<B> to convert from shared_ptr<A> to shared_ptr<B>

Thanks, it solved my problem.


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