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
Alexandre Oliva wrote:
>
> 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.
>
Where does auto_ptr_array come from? Itīs not in SGIīs STL and I have
not
seen it in the Stroustrup either.
> > Returning an auto_ptr is not really an option. According to Stroustrup,
> > "The C++ Programming Language" 3rd Edition page 368, auto_ptr does not
> > contain a cast operator to its element type.
>
> But it provides a get() method, that you could use to obtain the
> pointer to the contained object.
>
Thatīs what I use now.
Regards
Joerg