another question on hidden mixin names
60rntogo at gmail.com
Thu Sep 17 21:05:59 UTC 2020
I suspect that this is similar to the issue I asked about here:
https://firstname.lastname@example.org, but I can't figure it out.
private mixin template assign(string op_)
ref auto opOpAssign(string op, this RHS)(RHS rhs) if (op == op_)
mixin("x " ~ op ~ "= rhs.x;");
// mixin assign!"-";
auto v = V(2);
v += v;
assert(v.x == 4);
However, if I uncomment the second mixin, there is an error "v is
not a scalar, it is a V". I guess I somehow need to merge these
overloads, but I don't know how.
More information about the Digitalmars-d-learn