|
Boost Users : |
From: George A. Heintzelman (georgeh_at_[hidden])
Date: 2003-03-28 12:09:30
> 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_at_[hidden]
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