From: Howard Hinnant (hinnant_at_[hidden])
Date: 2000-10-02 17:30:20
David Abrahams wrote on 10/2/2000 5:56 PM
><snip> Hint: set "always use spaces for indentation" in your wonderful
>CodeWarrior IDE ;-)
Oh no! Tab Wars! :-)
>> Admittedly, I was not actually using auto_array_ptr, because I needed to
>> traffic in uninitialized memory. But it was a very close relative. I
>> can easily see that vector is not always a drop-in replacement for
>> auto_array_ptr (but admit that it often can be).
>For the record, my use was similar to Howard's. Of course an
>auto_array_ptr<char> could work for uninitialized memory, couldn't it?
Sure. More specifically, a specification for my container was that it
allocate and deallocate all memory by using a possibly user-supplied
allocator. Thus my "auto_ptr" had to correctly call the allocator's
deallocate. I was really replacing vector<node*,
allocator_type::rebind<node*>::other>, not vector<node*>.
For those of you who might be CodeWarrior Pro 6 owners (Dave ;-)), I am
speaking of alloc_ptr found in <msl_utility>. It is essentially auto_ptr
on steroids. It has yet to be determined whether all that steriod use
will give it a short life or not. :-)
Greg Colvin wrote on 10/2/2000 6:19 PM
>And what, pray tell, is std::_Array?
The parametrization deleter function that we were previously speaking
about (one which uses delete).
>And since when does std::auto_ptr take a second template parameter?
It has been an optional extension to the standard in Metrowerks
CodeWarrior for approximately the past year. It can be #ifdef'd out if
it causes troubles with template templates.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk