Re: Smart Pointers : auto_ptr and array
On May 25, 10:04 pm, Howard Hinnant <howard.hinn...@gmail.com> wrote:
In article <1179563347.135800.218...@w5g2000hsg.googlegroups.com>,
James Kanze <james.ka...@gmail.com> wrote:
About all I know is that today, I can generally use it for the
purposes I want it for, with just about any compiler. Which is
considerable progress.
See the latest working draft:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2284.pdf
for the latest change in the continually evolving auto_ptr:
It's deprecated. ;-)
Currently the best write up I have on auto_ptr, why it is deprecated,
and its replacement unique_ptr (which *will* work in containers) is:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1856.html#20...
%20-%20Class%20template%20auto_ptr
So you invent a new name for something which serves more or less
the same purpose.
Just curious, but why the new name? Are there any legal uses of
auto_ptr that won't work exactly the same with unique_ptr? And
if not, why not call it auto_ptr, assuming that that doesn't
break any working code? (I use auto_ptr a lot in multithreaded
programs, even when I'm also using the Boehm collector.)
--
James Kanze (Gabi Software) email: james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34