Slice expressions - exact evaluation order, dollar
Iain Buclaw via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jun 26 00:36:41 PDT 2016
On 26 June 2016 at 03:30, Timon Gehr via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On 17.06.2016 21:59, kinke wrote:
>>
>>
>> Most interesting IMO though is the question when the slicee's pointer is
>> to be loaded. This is only relevant if the base is an lvalue and may
>> therefore be modified when evaluating the bound expressions. Should the
>> returned slice be based on the slicee's buffer before or after
>> evaluating the bounds expressions?
>> This has been triggered by
>> https://github.com/ldc-developers/ldc/issues/1433 as LDC loads the
>> pointer before evaluating the bounds.
>
>
> Evaluation order should be strictly left-to-right. DMD and GDC get it wrong
> here.
>
It is evaluated left-to-right. getBase() -> getLowerBound() -> getUpperBound().
More information about the Digitalmars-d
mailing list