Proof of concept - library AA

Martin Nowak via Digitalmars-d digitalmars-d at puremagic.com
Fri May 29 04:16:59 PDT 2015


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.


More information about the Digitalmars-d mailing list