[C++-sig] Taking ownership of a base pointer

Aaron Bentley abentley at panoramicfeedback.com
Thu Jan 20 17:02:27 CET 2005

Hi all,
I have some polymorphic code that wants to take ownership of a base pointer.

I've successfully used std::auto_ptr<ExactType>, to take ownership, but 
it doesn't work for std::auto_ptr<BaseType>.  I could always declare 
wrapper functions for every derived type, but is there a better way?

Aaron Bentley
Director of Technology
Panometrics, Inc.

More information about the Cplusplus-sig mailing list