|
Boost : |
From: Andy Little (andy_at_[hidden])
Date: 2004-07-05 19:34:15
"edA-qa mort-ora-y" <eda-qa_at_[hidden]> wrote
> Is there any interest in a library that performs strict type checking on
> values with unit quantities? The intent is to prevent operation and
> assigment of unlike types.
Could take a look here:
http://www.servocomm.freeserve.co.uk/Cpp/physical_quantity/index.html
> The library has a price for performance compared to native value
> operations. However, part of the requirements will be a flag (a #define
> ) that turns off the unit processing for the code, which effectively
> removes the classes (replaces the UnitValue simply with typedefs of the
> stored type).
This is doable in my library at the above link.
(However problems would start to arise if you need prefixed or incoherent
units.)
regards
Andy Little
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk