This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: temporary auto_ptr
- From: John Love-Jensen <eljay at adobe dot com>
- To: Dima Sorkin <dima dot sorkin at gmail dot com>, MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Thu, 29 Sep 2005 07:09:31 -0500
- Subject: Re: temporary auto_ptr
Hi Dima,
>This function doesn't pass compilation : why ?
The f2 function returns an auto_ptr<const A>.
You are trying to return an auto_ptr<const B>.
An auto_ptr<const B> is not an auto_ptr<const A>, regardless if a "B is an
A".
HTH,
--Eljay