
2 Apr
2007
2 Apr
'07
7:42 p.m.
Do the casts give you anything that dividing by the unit doesn't get for you? For example, if we have a quantity len, and we want to get the value:
quantity<SI::length> len = 2.0 * SI::meters; double d = len / SI::meters; // <---- gets the value!!
We're mainly concerned here about getting a non-const reference to the actual data. In the release version, we will be eliminating the existing quantity_casts as they are redundant and replacing them with one that allows direct mutating access to the underlying value_type... Matthias