Boost logo

Boost :

From: Matthias Schabel (boost_at_[hidden])
Date: 2007-01-20 15:01:42

> Well... they all share the "price" dimension, right?

Potentially, yes...
>> mcs::units allows arbitrary (or nearly so)
>> unit conversions
>> at runtime, but is restricted to a static set of fundamental units
>> (whatever they
>> may be).
> Like I feared.

Just to clarify, the set of fundamental units is defined at compile
time, but
is not mandated by the library. That is, you could define

1970s USD

as the set of fundamental units and the library would happily perform
compile-time dimensional analysis on integer or fractional powers of
combinations of these units...

> So you think mcs::units cannot possibly support run-time currencies in
> the near and far future?

If you're willing to do runtime conversions within the
value_type (as I discussed in a previous post on currency conversion),
then mcs::units could support arbitrary runtime conversion of currencies
relatively easily.


Matthias Schabel, Ph.D.
Assistant Professor, Department of Radiology
Utah Center for Advanced Imaging Research
729 Arapeen Drive
Salt Lake City, UT 84108
801-587-9413 (work)
801-585-3592 (fax)
801-706-5760 (cell)
801-484-0811 (home)
matthias dot schabel at hsc dot utah dot edu

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