Reference counted containers prototype

Jacob Carlborg doob at me.com
Tue Dec 27 12:24:34 PST 2011


On 2011-12-27 02:30, Peter Alexander wrote:
> On 27/12/11 1:14 AM, Robert Jacques wrote:
>> On Mon, 26 Dec 2011 17:09:02 -0800, Peter Alexander
>>> 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. Looking at the source code asConst is a private member
>> function and therefore, given we are using opDispatch for forwarding,
>> these methods should have _ or __ prepended onto them.
>
> Identifiers starting with __ are reserved, which leaves you with _,
> which could be used by the held object also.

It's not enforced by the compiler.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list