On 23 February 2010 14:55, Baptiste Lepilleur <baptiste.lepilleur@gmail.com> wrote:
[A] template<class Y>
[B] explicit shared_ptr(std::auto_ptr<Y> & r): px(r.get()), pn()
By the way, shouldn't this constructor take std::auto_ptr by value instead of by reference. I remember being forced to introduce a local variable with the example below (was with sunstudio 12, default STL if I remember correctly). I think this was caused because you can not bind a temporary object to a non const reference.