11 Dec
2002
11 Dec
'02
11:29 p.m.
On Wednesday, December 11, 2002, at 11:01 AM, TEA Hartmann, Steven wrote:
I need some help in testing for the condition of whether a shared_ptr has been assigned. In the following example, the "if( b != NULL ) does not work. How would I do this test?
typedef boost::shared_ptr<int> IPtr;
int i( 0 ); IPtr a( i ); IPtr b;
if( some condition ) b = a;
if( b != NULL ) { // How should this really be coded? }
if (b) -- Darin