From: Matthias Schabel (boost_at_[hidden])
Date: 2007-01-20 13:35:18
> Worse, I think you can't fix the set of currencies at compile-time.
> 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)
at runtime, but is restricted to a static set of fundamental units
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 acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk