What is Quantities?
Quantities is a software package which allows the use within C++ programs of objects which have dimensionality and units attached
in a way similar to the use of the builtin
types float or double. It is thus an implementation of quantity
calculus in C++. Most mathematical and arithmetic functions are available, and for all operations the rules of quantity calculus are observed. Thus, for example, addition is only allowed if the dimensions of the two objects are commensurate. The values are automatically adjusted to the unit used.
Most functionality is implemented through template metaprogramming. Thus, errors are detected at compile time, and runtime overhead is minimized.
