Trying to understand a simple piece of code: dmd barray
schveiguy at gmail.com
Sat Mar 7 13:01:05 UTC 2020
On 3/7/20 7:26 AM, drug wrote:
> 07.03.2020 15:05, Dibyendu Majumdar пишет:
>> I am trying to understand
>> Two questions:
>> 1. What does this mean and why is it needed?
>> line 95: alias array this;
> This means that `array` can be used instead of `this`
To expand on this, the compiler basically substitutes the symbol aliased
here for the item itself if all other members are a compiler error.
So for example, if you have:
and barr has no member length, it tries:
More information about the Digitalmars-d-learn