alias restriction??!

Paul Backus snarwin at gmail.com
Sun Jul 19 15:00:59 UTC 2020


On Sunday, 19 July 2020 at 12:42:47 UTC, Carl Sturtivant wrote:
> On Sunday, 19 July 2020 at 12:08:07 UTC, Paul Backus wrote:
>>
>> Easiest workaround:
>>
>> ref inout(long) Second() inout { return second.one; }
>
> Was trying to avoid this for performance reasons. In fact what 
> are the performance implications of this sort of thing with 
> current implementations? --- relative to using a simple offset.

Almost certainly no difference at all. Even DMD can inline this 
function:

https://d.godbolt.org/z/7ve6M8


More information about the Digitalmars-d-learn mailing list