Boost logo

Boost Users :

From: TEA Hartmann, Steven (SHartmann_at_[hidden])
Date: 2002-12-11 14:01:55


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?
}
        

Best Regards,

Steve

[Non-text portions of this message have been removed]


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