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
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