signal 11 generating problem, was: Further observations regarding alloca on i586-pc-linux-gnu
Joerg Pommnitz
pommnitz@darmstadt.gmd.de
Tue Aug 25 19:31:00 GMT 1998
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
More information about the Gcc
mailing list