
8 Jun
2006
8 Jun
'06
4:50 p.m.
On Wed, Jun 07, 2006 at 08:42:14PM +0100, Andy Little wrote:
typedef double length; typedef double mass;
Well, of course I am speaking of types such that the expression mass x = foot/second; a compile-time error. 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. Regards -Gerhard -- Gerhard Wesp ZRH office voice: +41 (0)44 668 1878 ZRH office fax: +41 (0)44 200 1818 For the rest I claim that raw pointers must be abolished.