
26 Mar
2007
26 Mar
'07
9:52 p.m.
Please take everything I say with a gigantic salt crystal, but I would want to forbid an expression like "inches * miles / furlongs". You might recall that I am one of the few who wants explicit unit casting.
I think one of the important things to note is that our implementation allows the user fine-grained control of unit conversion - the default is explicit only, but it is possible to specify that certain units are implicitly convertible. For example, if I write quantity<SI::length> L1(1.5*inches*miles/furlongs); This will compile and give a correct answer if and only if there is a conversion (implicit or explicit) for each of the length units on the right. Matthias