[C++-sig] Re: Allocating objects on the heap by default.
David Abrahams
dave at boost-consulting.com
Tue Jul 8 03:48:10 CEST 2003
Nicodemus <nicodemus at globalite.com.br> writes:
> 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.
OK,
holder(A, auto_ptr)
is still a possibility. I don't have a strong feeling about what it
should be though.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list