
13 May
2002
13 May
'02
6:44 p.m.
From: "Andrew R. Thomas-Cramer"
In this function declaration, is there a simpler way to express a null
void foo( const boost::shared_ptr<T> & p = boost::shared_ptr<T>( ) );
In this function call, is there a simpler way to express a null shared
shared pointer as the default argument value? pointer as the actual argument?
foo( boost::shared_ptr<T>( ) );
No to both. In 1.27 boost::shared_ptr can be constructed from the literal 0, but the constructor is explicit. In 1.28, the literal 0 is no longer a valid argument to the constructor.