Boost logo

Boost :

From: Matthias Schabel (boost_at_[hidden])
Date: 2007-01-20 13:35:18

Hi Aristid,

> Worse, I think you can't fix the set of currencies at compile-time.
> Even
> if you were willing to change your program whenever a new currency is
> added to the set of world currencies (admittedly relatively rarely but
> it does happen), you might quickly want to add stuff like wheat or
> stocks (if only for completeness sake).
> Any ideas how to deal with this properly?

I really don't know of a way (at least in C++) to provide zero overhead
compile-time dimensional analysis where you don't specify the set of
currencies in advance. 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). The kind of application you're envisioning probably calls for a
runtime system or (even better) a specific library for dealing with


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