alias this

Rob T rob at ucora.com
Fri Nov 30 13:46:45 PST 2012


On Friday, 30 November 2012 at 14:14:36 UTC, js.mdnq wrote:
> On Friday, 30 November 2012 at 14:02:42 UTC, Andrej Mitrovic 
> wrote:
>> On 11/30/12, js.mdnq <js_adddot+mdng at gmail.com> wrote:
>>> alias t this;
>>
>> This should explain: http://dlang.org/class.html#AliasThis
>
> Thanks, I'm sure I saw that at some point but I guess it just 
> didn't sink in. This seems really cool and might solve a 
> problem I had much more elegantly...

Note that multiple alias this declarations are slated to be 
allowed, but have not yet been implemented:

-----------
Multiple AliasThis are allowed. For implicit conversions and 
forwarded lookups, all AliasThis declarations are attempted; if 
more than one AliasThis is eligible, the ambiguity is disallowed 
by raising an error. Note: Multiple AliasThis is currently 
unimplemented.
-----------




More information about the Digitalmars-d-learn mailing list