|
Boost : |
From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2002-06-12 07:04:10
Hello there,
pardon me in advance if this is a FAQ but why is there no
costructor for scoped_ptr that takes a smart_ptr as an
argument?
Assuming, you have a funktion
std::auto_ptr<Obj> create_obj();
this would allow you to write
std::scoped_ptr<Obj> p(create_obj());
instead of
std::scoped_ptr<Obj> p(create_obj().release());
which is much better, IMO. And of course, it would mirror
shared_ptr, which has such a constructor.
Markus
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk