What's the equivalent to the following:
std::vector<Foo*> vec;
vec.push_back(NULL);
when dealing with boost::shared_ptr? Is it the following code?
std::vector< boost::shared_ptr<Foo> > vec;
vec.push_back(boost::shared_ptr<Foo>());
Note: I may push back a lot of such objects. Should I declare a global static nullPtr object somewhere? That way only one of them would have to be constructed:
boost::shared_ptr<Foo> nullPtr;