Proof of concept - library AA

IgorStepanov via Digitalmars-d digitalmars-d at puremagic.com
Fri May 29 04:22:51 PDT 2015


On Friday, 29 May 2015 at 11:17:00 UTC, Martin Nowak wrote:
> On Wednesday, 27 May 2015 at 17:16:53 UTC, IgorStepanov wrote:
>> Foo f;
>> f[5][3] = Foo(42); translates to
>>    f.opIndex!(true)(5).opIndex!(true)(3) = Foo(42);
>>
>> auto x = f[5][4]; translates to
>>    auto x = f.opIndex!(false)(5).opIndex!(false)(3);
>
> We shouldn't replace opIndexAssign though, b/c default 
> construction + assignment is more expensive than constructing 
> in-place.

Sorry, I meant
f.opIndex!(true)(5).opIndexAssign(Foo(42), 3);


More information about the Digitalmars-d mailing list