Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-10-16 07:26:44

Paul A. Bristow wrote:

> |
> | The slides have examples where the units are from physics. So you
> | represent a number's units as a n-tuple of exponents with each
> | exponent corresponding to one of the fundamental SI units.
> | Arithmetic operations on numbers with these units have well
> | defined rules to compute the resulting units.
> |
> | If the semantics of the exponents in the n-tuple are user defined, ...
> <snipped>
> Would an example here be if the exponents in the n-tuple were of type rational
> rather than type integer?

Well, you can make "compile-time rationals", but they can't look like
our Boost rational class because the numerator and denominator have to
be part of the type.

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