[C++-sig] Re: Allocating objects on the heap by default.
Nicodemus
nicodemus at globalite.com.br
Tue Jul 8 23:24:42 CEST 2003
David Abrahams wrote:
>Pyste is about providing
>an even terser syntax for accomplishing the same things, and
>'std::auto_ptr<A>' is not only longer but it repeats information.
>Also, how will that interface work when you have a class with virtual
>functions that you want to be held by auto_ptr?
>
>
I think we can provide functions for the most common smart pointers to
be registered directly:
hold_with_auto_ptr(A) # or perhaps: auto_ptr_holder(A)?
hold_with_smart_ptr(A)
And a more general purpose function for any other smart pointer:
hold(A, 'my_smart_ptr<A>')
It does duplicate information, but very little in my opinion.
More information about the Cplusplus-sig
mailing list