Boost logo

Boost :

From: Dan W. (danw_at_[hidden])
Date: 2004-01-02 15:53:27

Andy Little wrote:
> Hi to all at boost,
> Continuing experiments with the physical-quantities type have shown it
> to be very suitable as the basis for a runtime modifiable unit physical
> quantity type, which I know is something that has been requested quite a few
> times
> Sample code/use for a runtime modifiable type based on the physical-quantity
> type below.--->

BRAVO! That looks like a great improvement. However I must say that one
issue for me, which has been discussed already, is the ability to define
one's own quantities and units. I admit this is lame and inelegant, but
in real life coding I would probably use actual *physical* units maybe
10% of the time, and absurd units 90%. Example: Being able to declare,

q_bytes byte_count = 0;

q_MSmilliseconds = q_Second / 1024;
q_MSmilliseconds mm_time; //MS's Multi-Media timer ticks..

Something of the sort, and then, say, have a quantity for byte-flow rate
defined as bytes per Microsoft millisecond. Not to speak of currencies,
probabilities, fractional freckles, and the like.

Where I would *really* use real physical quantities 90% of the time is
in my old virtual reality engine, if I get back to work on it again, one
of these days, as I was planning to model realistic physics at a very
low level. But for most applications, I would probably benefit more
from totally ridiculous and insulting quantities like the ones I just


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