Boost logo

Boost Users :

From: Daniel Franklin (yg-boost-users_at_[hidden])
Date: 2003-04-29 07:16:16


Is the constructor for scoped_ptr that takes an auto_ptr argument part
of the proposed standard? The boost documentation makes no mention of
it, yet it exists in the implementation as:

explicit scoped_ptr(std::auto_ptr<T> p): ptr(p.release()) // never throws
{
}

Personally I think it should be included in the proposed standard if it
is not. I can't see any reason why it shouldn't be, as it doesn't seem
to break the fundamental concepts behind auto_ptrs (ownership
transferal) or scoped_ptrs (sole ownership). Ownership of the object is
transfered from the auto_ptr to the scoped_ptr, and thereafter retained
solely by that scoped_ptr.

Regards,
Daniel Franklin


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