28 Mar
2003
28 Mar
'03
5:09 p.m.
You could shorten things with this (untested) function:
template <typename T> boost::shared_ptr<T> make_sp(T* p) { return boost::shared_ptr<T>(p); }
Which, IMHO, should be added to the boost shared pointer library (as make_shared_ptr) along with a version which takes auto_ptr<T> (which shared_ptr also has an explicit constructor for). George Heintzelman georgeh@aya.yale.edu