Boost logo

Boost :

From: Leland Brown (lelandbrown_at_[hidden])
Date: 2006-06-09 03:29:14

Gerhard Wesp <gwesp <at>> writes:
> IOW, for me a physical quantity would just be the bare
> template< int mass, int time, int distance, /* rest of 7 SI base units */ >
> class pq {
> double value;
> };
> (add all the necessary construcors, accessors, operators, etc...; may
> also be templated on the value type.)
> I believe the rest of a PQ library can be created around this template.

FWIW, this is exactly how I implemented the equivalent of "t2_quantity" in my
own library. I find it to be what I need for most of my scientific
computations. I look forward to its coming later (hopefully) in PQS.

On the other hand, Andy implemented his "t1_quantity" first, and I see the
value of that also, but for different situations. What you and I need is
really the yet-to-come t2_quantity (and I need t3_quantity as well), but I
think they can fit well into a common framework.

What Andy has now is a good start, but t1_quantity alone doesn't satisfy all
the users. I think that's the really source of some of the criticisms that PQS
has received.

-- Leland

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