[C++-sig] Re: Allocating objects on the heap by default.
Nicodemus
nicodemus at globalite.com.br
Mon Jul 7 23:37:27 CEST 2003
David Abrahams wrote:
>Prabhu Ramachandran <prabhu at aero.iitm.ernet.in> writes:
>
>
>> DA> If Pyste wants to supply auto_ptr and shared_ptr objects so
>> DA> that
>>
>> DA> A.held_by(auto_ptr)
>> DA> or
>> DA> A.held_by(shared_ptr)
>>
>>Hmm, I am not sure if the A.held_by approach is easy to do
>>
>>
>
>What could be hard about it?
>
>
Because there is an ambiguity here, since you can acess the members of a
class with the same syntax:
exclude(A.foo) # exclude the foo member
exclude(A.held_by) # exclude the held_by member
Plus, all other options use the function syntax.
Cheers,
Nicodemus.
More information about the Cplusplus-sig
mailing list