signal 11 generating problem, was: Further observations regarding alloca on i586-pc-linux-gnu
Joe Buck
jbuck@synopsys.com
Wed Aug 26 08:25:00 GMT 1998
> > Yup, it's syntactically valid C++, but it is wrong because auto_ptr
> > will delete the pointer to the array as if it were a pointer to a
> > single object. You should write auto_ptr_array instead.
>
> Is auto_ptr_array a standard template? If so, where is it defined?
No, there is no standard template by that name. It has been proposed
by many people to be analogous to auto_ptr, except that it would contain a
pointer to an array on the heap (e.g. "new MyClass[5]") and would do
"delete []" rather than "delete" in the destructor.
The committee's response to such proposals has been to try to get people
to just use vector, which is OK as long as you aren't trying to interface
to C code that wants a genuine C array.
More information about the Gcc
mailing list