[C++-sig] Re: Allocating objects on the heap by default.

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Tue Jul 8 05:01:34 CEST 2003

>>>>> "DA" == David Abrahams <dave at boost-consulting.com> writes:

    DA> OK,

    DA>     holder(A, auto_ptr)

    DA> is still a possibility.  I don't have a strong feeling about
    DA> what it should be though.

How about holder(A, 'std::auto_ptr'), holder(A, 'boost::shared_ptr'),
holder(A, 'user::smart_ptr').  Internally the HeldType will add the
right template parameter?  But what if the smart pointer is not a
templated class?  In that case we'd need to use something like this:

 holder(A, 'std::auto_ptr< %s >'), holder(A, 'user::smart_ptr').

Is that OK or is it too ugly?


More information about the Cplusplus-sig mailing list