Boost logo

Boost :

From: Eric Ford (eford_at_[hidden])
Date: 2001-10-05 12:19:40

--- In boost_at_y..., Jonathan H Lundquist <jhl_at_s...> wrote:
> I think they have to be more than pure numbers, they're units of
> measure in that bins can be converted to cartons, etc. But the
> conversion factors do depend on the qualifiers.
> We're converting to some fictional unit of volume, usually from
> unit of volume. However, we also have to convert from units of
> to units of volume. A given number of lbs. of apples is a known
> of carton equivalents (approximated).

You can count cartons and call that the number of cartons.
Alternatively you can measure a physical quantity in units of that
physical quantity of the carton. Yes, a the unit
weight_of_bag_of_sugar may be different thatn weight_bag_of_rice. If
you're converting a weight into a volume, you're probably using a
density and an acceleration, although some people "hide" those.

> At the time I wrote, I thought most of the discussion treated what
> now being called tags as analagous to user defined units of measure.
> I think the least which is needed are SI units, user defined units,
> tags. I also think tags have to be able to express what is and is
> fungible.

In my qualified_unit the user specializes the operations they desire
to allow conversions between differently taged quantities. While it
requires several lines of code, I think that your requests are
possible. Once other things are working, we can try to reduce the
ammount of user code necessary to provide commonly requested


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