Boost logo

Boost Users :

Subject: Re: [Boost-users] shared_ptr question
From: Michael Jackson (mike.jackson_at_[hidden])
Date: 2010-05-18 11:10:58


On 5/18/10 10:52 AM, in article 4BF2A9C4.7060601_at_[hidden], "Eric J.
Holtman" wrote:

> On 5/18/2010 9:38 AM, Michael Jackson wrote:
>>
>> if (rx)
>>
>> is only testing if the wrapper is valid, NOT the actual pointer itself that
>> is being wrapped. What you really want is:
>>
>> If (rx.get() != NULL)
>>
>>
>
> No, you don't need that.
>
> http://www.boost.org/doc/libs/1_43_0/libs/smart_ptr/shared_ptr.htm#conversions
Cool, I guess we learn something new everyday.

Thanks

--
Mike Jackson

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