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);

Reply via email to