Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2003-10-15 09:37:09

In prior discussions of units-of-measure problems, it was pointed out that
in many applications it might be necessary to tag types with more than just
simple units-of-measure like gallons or liters.

For example, if x and y are variables representing gallons, it still may
not be valid to add them together. (Consider that x may be gallons of
unleaded regular gasoline, while y may be gallons of propane.)

Even if x and y both represent gallons of propane, there can still be
problems: to do addition correctly, you must either know that the gallons
are temperature compensated or know the temperature of each. (Propane's
coefficient of expansion is high enough that by US law commercial
measurements must be temperature compensated.)

IIRC, prior discussions leaned toward solving such problems by allowing for
user supplied units-of-measure. That would allow industry specific problems
like the above examples to be solved without requiring the library to know
about every unit-of-measure need in the world.


Boost list run by bdawes at, gregod at, cpdaniel at, john at