From: Andy Little (andy_at_[hidden])
Date: 2004-01-09 15:32:56
"Deane Yang" <deane_yang_at_[hidden]> wrote
> To answer your question "what is typeof(j / s)", you would do
> what Hugo Duncan described a long, long time ago. A unit type
> would consist of a typelist of fundamental unit tags (all user-defined,
> if I had it my way) and a rational number associated with each
> tag. Then the type of "j/s" would be a typelist
> containing a tag representing joules (with an exponent of 1) and
> another tag representing seconds (with an exponent of -1).
using namespace physical_quantities;
std::cout << j/s <<'\n';
BTW Who said my lib doesnt do D.A. ?
Have they tried it?
First rule of physics:
Prove your conjectures by testing
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk