This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: signal 11 generating problem, was: Further observations regarding alloca on i586-pc-linux-gnu
- To: martin at mira dot isdn dot cs dot tu-berlin dot de (Martin von Loewis)
- Subject: Re: signal 11 generating problem, was: Further observations regarding alloca on i586-pc-linux-gnu
- From: Joe Buck <jbuck at synopsys dot com>
- Date: Wed, 26 Aug 98 8:20:32 PDT
- Cc: oliva at dcc dot unicamp dot br, egcs at cygnus dot com
> > 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.