Issue 1974 - What's your opinion?
john.loughran.colvin at gmail.com
Sat Oct 26 17:13:08 UTC 2019
On Saturday, 26 October 2019 at 14:41:38 UTC, John Colvin wrote:
> If you want to stick with thinking/implementing by lowering,
> you could do something like this (for structs at least):
> auto ref __opOpAssignImpl(string op, S, T)(ref S s, auto ref T
> return s.opOpAssign!op(forward!s);
> and then a+=b is lowered to a.__opOpAssignImpl(b) and if a is
> an rvalue you will get your error.
Rather obvious typo correction:
auto ref __opOpAssignImpl(string op, S, T)(ref S s, auto ref T v)
More information about the Digitalmars-d