Reference counted containers prototype

Joshua Reusch yoschi at arkandos.de
Tue Dec 27 07:27:12 PST 2011


Am 27.12.2011 02:14, schrieb Robert Jacques:
> On Mon, 26 Dec 2011 17:09:02 -0800, Peter Alexander
> <peter.alexander.au at gmail.com> wrote:
>
>> On 26/12/11 5:25 PM, Andrei Alexandrescu wrote:
>>> (a) All interaction with the held object is done via opDispatch. In fact
>>> opDispatch can be engineered to statically enforce no reference to the
>>> held object escapes.
>>
>> I have a separate, but very much related concern:
>>
>> If the held object has a method with the same name as RefCounted (e.g.
>> asConst) then how do you call the held object's method instead of
>> RefCounted's method?
>
> You, can't.

You can:

container.opDispatch!"asConst"();



More information about the Digitalmars-d mailing list