
29 Mar
2007
29 Mar
'07
2:49 p.m.
Also, quantity<> should pass through operator++ and operator-- in addition to the other arithmetic operators.
I strongly disagree. Those operators make no sense for dimensioned quantities; it would be like allowing "12.34 meters + 1".
This raises an interesting question; in this case double v(1.0); ++v; does the ++v mean v = v + 1; or v = v + double(1); ? In either case, this would be illegal with our current quantity syntax, so perhaps it should not be supported, at least until a clear need for it is demonstrated... Matthias