This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: temporary auto_ptr


On 9/29/05, John Love-Jensen  wrote:
> 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".
  And it does not matter that there is an implicit conversion possible
between auto_ptr<const B>& and auto_ptr<const A> ?
(unless I explicitly state I want to do it, as in "f1" )

Regards,
 Dima.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]