Boost logo

Boost :

From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2002-10-17 00:11:39


At Wednesday 2002/10/16 09:57, you wrote:
>Greetings boosters,
>I've been working for some time now on a physical unit's library that I'd
>like to submit to boost. It uses the concept of generating units out of
>physical dimensions. It provides type-safety and implicit conversion between
>units using operators.
>The unit's dimension orders are static constant integers and are calculated
>on compile-time (using mpl); however, the conversion between the unit's
>values are calculated on run time. The coversion between pure units is
>policy-driven and is easy to add more pure-units to the policies.

I like the idea... I've heard that there is some code at FermiLab that may
do the same thing, have you looked at it?

[some of the example deleted]

>int main(int argc, char* argv[])
>{
> some_unit_t some_unit(10.0);
> some_other_unit_t some_other_unit(20.0);
> product_result_t product_res(some_unit*some_other_unit);
> std::cout << product_res << std::endl;
>}
>
> output :
> 20 s^-2 kg^2 m^3

<nit>
Since the SI used to be called mks I would expect the units to be published
in length, mass, time order rather than the other way round. (btw, what
measure is m^3 kg^2 s^-2 ?)
</nit>

>_______________________________________________
>Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Victor A. Wagner Jr. http://rudbek.com
PGP RSA fingerprint = 4D20 EBF6 0101 B069 3817 8DBF C846 E47A
PGP D-H fingerprint = 98BC 65E3 1A19 43EC 3908 65B9 F755 E6F4 63BB 9D93
The five most dangerous words in the English language:
               "There oughta be a law"


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk