"not an lvalue"
CrypticMetaphor
CrypticMetaphor88 at gmail.com
Sun May 1 06:55:37 PDT 2011
Yes, you were right:
Vector3
{
// ...
/// Binary operator for operator + and -
public Vector3 opBinary(string op) (const ref Vector3 rhs) const if (op
== "+" || op == "-")
{
mixin("return new Vector3(x" ~ op ~ "rhs.x, y" ~ op ~ "rhs.y, z" ~
op ~ "rhs.z);");
}
// ...
}
I removed ref and it worked. I'm a bit confused by this, I'll go read up
on the ref keyword.
More information about the Digitalmars-d-learn
mailing list