29 Jan
2014
29 Jan
'14
5:27 p.m.
Hello, Does boost::shared_ptr offer a way to create an empty shared pointer without a lot of typing? Perhaps something analogous to boost::none. I am not using c++11. Thank you, Chris == using boost::none; using boost::optional; // declare f(optional<CSomeReallyLongClassName> Item); g(shared_ptr<CSomeReallyLongClassName> pItem); // invoke f with empty object f(none); // invoke g with empty object g(shared_ptr<CSomeReallyLongClassName>());