I added:
static X tmpOpMul(X x, int y)
{
return X(x.value * y);
}
To X, and I can do:
static myX4 = X.tmpOpMul(myX, 4);
without error. I don't see how this is any different than calling opMul.
It should be evaluatable at compile time, no?
-Steve