
30 Mar
2006
30 Mar
'06
12:20 p.m.
"Sam Partington" <sam.partington@gmail.com> 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