|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2006-03-30 07:20:03
"Sam Partington" <sam.partington_at_[hidden]> writes:
> Hi there,
>
> I'm very much in support of new_<>, it seems like an excellent addition. But...
>
> ...might it be better for new_<> to return a unique_ptr [1] rather
> than an auto_ptr?
In principle, yes. But unfortunately we have no smart pointers that
can accept a unique_ptr as a ctor argument today, and we won't be able
to change auto_ptr in that way, and anyway there's really nothing
wrong with auto_ptr until it becomes an lvalue... so auto_ptr is the
right choice in this case.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk